10% show-post-in-lightbox

Code Review | Show Post In lightbox

WordPress plugin Show Post In lightbox scored10%from 54 tests.

About plugin

  • Plugin page: show-post-in-ligh...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Mar 31, 2014
  • Latest release: Sep 9, 2015
  • Number of updates: 8
  • Update frequency: every 66.1 days
  • Top authors: opensourcetech (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /4,532 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/show-post-in-lightbox/spbc_showPostsWidget.php+3
    Undefined index: popup

Server metrics [RAM: ▼1.96MB] [CPU: ▼60.86ms] Passed 4 tests

An overview of server-side resources used by Show Post In lightbox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.64 ▼41.44
Dashboard /wp-admin2.05 ▼1.266.78 ▼45.29
Posts /wp-admin/edit.php2.05 ▼1.314.94 ▼52.88
Add New Post /wp-admin/post-new.php2.05 ▼3.845.56 ▼103.84
Media Library /wp-admin/upload.php2.05 ▼1.187.43 ▼30.39

Server storage [IO: ▲0.22MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_spbc_showpostswidget
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Show Post In lightbox
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲11813.50 ▼0.8710.34 ▲8.5343.13 ▼1.69
Dashboard /wp-admin2,192 ▲125.67 ▲0.0198.29 ▲3.7952.23 ▲8.12
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0438.11 ▼0.3236.12 ▲1.46
Add New Post /wp-admin/post-new.php1,549 ▲1318.38 ▼4.93654.29 ▼16.1159.59 ▲9.26
Media Library /wp-admin/upload.php1,400 ▼04.27 ▼0.0395.30 ▼11.7043.43 ▼2.39

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/show-post-in-lightbox/spbc_showPostsWidget.php+3
    Undefined index: popup
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_spbc_showpostswidget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/show-post-in-lightbox/spbc_showPostsWidget.php:17
    • > PHP Notice
      Undefined index: popup in wp-content/plugins/show-post-in-lightbox/spbc_showPostsWidget.php on line 3
    • > PHP Notice
      Undefined index: popup in wp-content/plugins/show-post-in-lightbox/spbc_showPostsWidget.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/show-post-in-lightbox/spbc_showPostsWidget.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: post in lightbox plugin, posts, popup, lightbox, post in lightbox

show-post-in-lightbox/show_posts.php 85% from 13 tests

The main file in "Show Post In lightbox" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("show-post-in-lightbox.php" instead of "show_posts.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 359 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin378 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25518297
JavaScript19245
CSS16436

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.18MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
shortcode.png36.04KB23.54KB▼ 34.70%
default-display-on-frontend.png41.39KB22.40KB▼ 45.88%
popup.png109.52KB44.22KB▼ 59.63%
ostlightbox/css/tb-close.png1.12KB0.33KB▼ 70.10%