84% meta-box-gallerymeta

Code Review | Meta-box GalleryMeta

WordPress plugin Meta-box GalleryMeta scored84%from 54 tests.

About plugin

  • Plugin page: meta-box-gallerymeta
  • Plugin version: 2.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2021
  • Latest release: Nov 10, 2023
  • Number of updates: 16
  • Update frequency: every 63.7 days
  • Top authors: shahinurislam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.54ms] Passed 4 tests

Server-side resources used by Meta-box GalleryMeta
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1438.84 ▼2.44
Dashboard /wp-admin3.43 ▲0.0847.15 ▼16.96
Posts /wp-admin/edit.php3.54 ▲0.1946.28 ▼1.80
Add New Post /wp-admin/post-new.php6.03 ▲0.1491.67 ▼0.96
Media Library /wp-admin/upload.php3.35 ▲0.1234.71 ▲1.92
MBG Tags /wp-admin/edit-tags.php?taxonomy=mbg_tag&post_type=mb_gallery3.3432.34
MBG Categories /wp-admin/edit-tags.php?taxonomy=mbg_category&post_type=mb_gallery3.3532.83
All MBG /wp-admin/edit.php?post_type=mb_gallery3.4034.20
Add New /wp-admin/post-new.php?post_type=mb_gallery3.5051.10
Settings /wp-admin/edit.php?post_type=mb_gallery&page=mbg_settings3.3230.24

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Meta-box GalleryMeta
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲15613.49 ▼0.799.33 ▲7.6739.23 ▼4.78
Dashboard /wp-admin2,237 ▲635.63 ▼0.0192.60 ▼11.2242.36 ▲0.43
Posts /wp-admin/edit.php2,142 ▲452.03 ▲0.0239.31 ▲3.0935.77 ▲0.95
Add New Post /wp-admin/post-new.php1,562 ▲3623.50 ▼0.23663.90 ▼42.9863.00 ▲7.66
Media Library /wp-admin/upload.php1,439 ▲364.19 ▲0.0595.23 ▲0.1441.75 ▼2.72
MBG Tags /wp-admin/edit-tags.php?taxonomy=mbg_tag&post_type=mb_gallery1,2822.1228.0329.29
MBG Categories /wp-admin/edit-tags.php?taxonomy=mbg_category&post_type=mb_gallery1,3102.1229.5030.20
All MBG /wp-admin/edit.php?post_type=mb_gallery1,0921.9330.5929.81
Add New /wp-admin/post-new.php?post_type=mb_gallery2,7537.94177.4468.35
Settings /wp-admin/edit.php?post_type=mb_gallery&page=mbg_settings8302.0024.4426.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/meta-box-gallerymeta/include/posttype.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/meta-box-gallerymeta/gallerymetaboxes.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/meta-box-gallerymeta/templates/single-mb_gallery.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/meta-box-gallerymeta/include/medianame.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/meta-box-gallerymeta/include/enqueue.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: image, new page, gallery

meta-box-gallerymeta/gallerymetaboxes.php 85% from 13 tests

The main file in "Meta-box GalleryMeta" v. 2.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("meta-box-gallerymeta.php" instead of "gallerymetaboxes.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 187 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin3,009 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS4392442,202
PHP51446448
JavaScript5222114359

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/slider_arrow_right.png0.48KB0.17KB▼ 63.89%
images/lightbox-arrow-right.png1.29KB1.06KB▼ 17.69%
images/icon-zoom32.png1.60KB1.78KB0.00%
images/slider_bullets.png0.44KB0.35KB▼ 20.80%
images/play-button-square.png4.48KB1.62KB▼ 63.89%