83% ng-wp-gallery

Code Review | Multiple WP Responsive Photo Gallery

WordPress plugin Multiple WP Responsive Photo Gallery scored 83% from 54 tests.

About plugin

  • Plugin page: ng-wp-gallery
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.*-5.6
  • WordPress version: 6.3.1
  • First release: Mar 18, 2020
  • Latest release: Feb 1, 2021
  • Number of updates: 8
  • Update frequency: every 40.6 days
  • Top authors: naveen.developer (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 1,176 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.44ms] Passed 4 tests

Server-side resources used by Multiple WP Responsive Photo Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.57 ▲2.48
Dashboard /wp-admin3.35 ▲0.0547.28 ▼7.97
Posts /wp-admin/edit.php3.44 ▲0.0849.59 ▲0.97
Add New Post /wp-admin/post-new.php5.93 ▲0.0593.98 ▼0.84
Media Library /wp-admin/upload.php3.25 ▲0.0235.60 ▲2.07
Add New /wp-admin/post-new.php?post_type=mwrp_gallery3.3046.47
All Gallery /wp-admin/edit.php?post_type=mwrp_gallery3.3236.05

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Multiple WP Responsive Photo Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,088 ▲35315.46 ▲1.0811.35 ▲9.6042.80 ▲3.85
Dashboard /wp-admin2,377 ▲1896.43 ▲0.50119.49 ▲19.4036.08 ▼5.10
Posts /wp-admin/edit.php2,288 ▲1993.39 ▲1.3854.59 ▲14.4135.58 ▼0.07
Add New Post /wp-admin/post-new.php1,543 ▲2423.24 ▲0.08640.40 ▼29.8535.68 ▼17.80
Media Library /wp-admin/upload.php1,418 ▲274.29 ▲0.0677.31 ▼23.2841.26 ▼3.21
Add New /wp-admin/post-new.php?post_type=mwrp_gallery1,7183.8261.8532.46
All Gallery /wp-admin/edit.php?post_type=mwrp_gallery1,2573.4243.3726.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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
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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ng-wp-gallery/includes/admin/mwrpg-metabox-image.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/ng-wp-gallery/template/mwrpg-grid.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/ng-wp-gallery/template/mwrpg-masonry-scroll-load.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ng-wp-gallery/includes/admin/mwrpg-metabox-setting.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ng-wp-gallery/includes/mwrpg-shortcode.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/ng-wp-gallery/template/mwrpg-masonry.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: responsive gallery, image gallery, grid gallery layout, masonry gallery, photo gallery...

ng-wp-gallery/multiple-wp-responsive-photo-gallery.php 77% from 13 tests

The main PHP file in "Multiple WP Responsive Photo Gallery" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "5.*")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ng-wp-gallery.php" instead of "multiple-wp-responsive-photo-gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected515 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP87142303
CSS4111143
JavaScript3101369

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin