68% mediabox-ck

Code Review | Mediabox CK - Responsive Lightbox

WordPress plugin Mediabox CK - Responsive Lightbox scored68%from 54 tests.

About plugin

  • Plugin page: mediabox-ck
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2015
  • Latest release: Mar 9, 2020
  • Number of updates: 20
  • Update frequency: every 86.3 days
  • Top authors: ced1870 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,634 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.82ms] Passed 4 tests

Server-side resources used by Mediabox CK - Responsive Lightbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3551.58 ▲7.24
Dashboard /wp-admin3.32 ▲0.0245.38 ▼4.44
Posts /wp-admin/edit.php3.37 ▲0.0142.44 ▼0.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.74 ▼7.89
Media Library /wp-admin/upload.php3.24 ▲0.0135.68 ▲1.35
Mediabox CK /wp-admin/options-general.php?page=mediabox-ck3.2839.54

Server storage [IO: ▲0.37MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
mediaboxck_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Mediabox CK - Responsive Lightbox: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,996 ▲23913.75 ▼0.6114.27 ▲12.3943.51 ▼0.85
Dashboard /wp-admin2,213 ▲245.88 ▲0.9399.41 ▼8.4939.96 ▼4.37
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0134.73 ▲0.3033.89 ▼1.48
Add New Post /wp-admin/post-new.php1,531 ▼1123.29 ▲5.11643.74 ▲20.0646.93 ▼11.44
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0094.95 ▼3.6040.72 ▼3.94
Mediabox CK /wp-admin/options-general.php?page=mediabox-ck1,3833.3455.2284.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • mediaboxck_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant MEDIABOXCK_MEDIA_URL - assumed 'MEDIABOXCK_MEDIA_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mediabox-ck/interfaces/options.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mediabox-ck/interfaces/options-mobile.php:2
    • > PHP Warning
      Use of undefined constant MEDIABOXCK_MEDIA_URL - assumed 'MEDIABOXCK_MEDIA_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mediabox-ck/interfaces/options.php on line 4
    • > PHP Warning
      Use of undefined constant MEDIABOXCK_MEDIA_URL - assumed 'MEDIABOXCK_MEDIA_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mediabox-ck/interfaces/options.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mediabox-ck/interfaces/options-styles.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mediabox-ck/interfaces/options-effects.php:2
    • > PHP Warning
      Use of undefined constant MEDIABOXCK_WEBSITE - assumed 'MEDIABOXCK_WEBSITE' (this will throw an Error in a future version of PHP) in wp-content/plugins/mediabox-ck/interfaces/options.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mediabox-ck/interfaces/options.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mediabox-ck/interfaces/options-general.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=mediabox-ck
    • > Network (severe)
    wp-content/plugins/mediabox-ck/assets/jscolor/jscolor.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: mediabox, media, popup, videos, responsive...

mediabox-ck/mediabox-ck.php 92% from 13 tests

Analyzing the main PHP file in "Mediabox CK - Responsive Lightbox" version 1.1.3
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 170 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .url - Internet Shortcut in Firefox, IE, Chrome, Safari
      • wp-content/plugins/mediabox-ck/assets/jscolor/Demos of JSColor.URL
4,760 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33063642,025
CSS32051171,423
PHP92186811,181
PO File16178129
HTML2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity43.25
▷ Minimum class complexity10.00
▷ Maximum class complexity123.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods61
▷ Static methods1321.31%
▷ Public methods5285.25%
▷ Protected methods23.28%
▷ Private methods711.48%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants1460.87%
▷ Class constants939.13%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/80.png0.14KB0.09KB▼ 33.56%
images/logo_mediaboxck_64.png3.84KB2.76KB▼ 28.22%
assets/jscolor/hs.png2.62KB7.54KB0.00%
assets/jscolor/hv.png2.80KB7.32KB0.00%