84% meow-lightbox

Code Review | Meow Lightbox

WordPress plugin Meow Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: meow-lightbox
  • Plugin version: 5.0.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 23, 2016
  • Latest release: Nov 29, 2023
  • Number of updates: 213
  • Update frequency: every 12.5 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

142 reviews

Install metrics

7,000+ active /173,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▲0.06ms] Passed 4 tests

An overview of server-side resources used by Meow Lightbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2535.04 ▼4.78
Dashboard /wp-admin3.66 ▲0.3552.70 ▲3.02
Posts /wp-admin/edit.php3.71 ▲0.3553.48 ▲6.07
Add New Post /wp-admin/post-new.php6.18 ▲0.2989.23 ▼1.93
Media Library /wp-admin/upload.php3.52 ▲0.2938.72 ▲3.94
Lightbox /wp-admin/admin.php?page=mwl_settings3.5039.77
Dashboard /wp-admin/admin.php?page=meowapps-main-menu3.7058.96

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 62 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
mwl_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Meow Lightbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲9014.71 ▲0.502.44 ▲0.8537.06 ▼6.28
Dashboard /wp-admin2,248 ▲685.51 ▼0.1296.09 ▼4.4141.84 ▼1.66
Posts /wp-admin/edit.php2,153 ▲531.96 ▼0.0640.26 ▼0.4636.96 ▲5.27
Add New Post /wp-admin/post-new.php1,585 ▲5925.06 ▲2.10609.07 ▼13.6165.97 ▲20.86
Media Library /wp-admin/upload.php1,447 ▲444.14 ▼0.04100.63 ▲0.6742.96 ▼3.55
Lightbox /wp-admin/admin.php?page=mwl_settings1,51811.95288.2045.72
Dashboard /wp-admin/admin.php?page=meowapps-main-menu5,76211.91165.2874.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • mwl_options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'DiDom\ode' not found in wp-content/plugins/meow-lightbox/vendor/imangazaliev/didom/src/DiDom/Element.php:19
    • > PHP Warning
      require_once(MWL_PATH/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/meow-lightbox/classes/core.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'MWL_PATH/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/meow-lightbox/classes/core.php on line 3
    • > PHP Fatal error
      require(): Failed opening required 'MWL_PATH/classes/core.php' (include_path='.:/usr/share/php') in wp-content/plugins/meow-lightbox/classes/init.php on line 32
    • > PHP Warning
      Use of undefined constant MWL_PATH - assumed 'MWL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/meow-lightbox/classes/core.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'MeowCommon_Admin' not found in wp-content/plugins/meow-lightbox/classes/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/meow-lightbox/meow-lightbox.php:20
    • > PHP Warning
      Use of undefined constant MWL_PATH - assumed 'MWL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/meow-lightbox/classes/init.php on line 15
    • > PHP Warning
      require(MWL_PATH/classes/core.php): failed to open stream: No such file or directory in wp-content/plugins/meow-lightbox/classes/init.php on line 32
    • > PHP Fatal error
      Uncaught Error: Class 'DiDom\ode' not found in wp-content/plugins/meow-lightbox/vendor/imangazaliev/didom/src/DiDom/DocumentFragment.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Please add descriptions for these screenshots #2, #3 in meow-lightbox/assets to your readme.txt
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

meow-lightbox/meow-lightbox.php Passed 13 tests

The entry point to "Meow Lightbox" version 5.0.9 is a PHP file that has certain tags in its header comment area
43 characters long description:
Lightbox designed by and for photographers.

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 plugin7,462 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,4142,0305,775
Markdown559601,155
PO File13737191
JSON300171
JavaScript62365168
CSS2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity39.54
▷ Minimum class complexity1.00
▷ Maximum class complexity249.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes28
▷ Abstract classes13.57%
▷ Concrete classes2796.43%
▷ Final classes00.00%
Methods382
▷ Static methods6316.49%
▷ Public methods34690.58%
▷ Protected methods307.85%
▷ Private methods61.57%
Functions17
▷ Named functions423.53%
▷ Anonymous functions1376.47%
Constants32
▷ Global constants2887.50%
▷ Class constants412.50%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin