84% novas-gallery

Code Review | Nova's Gallery

WordPress plugin Nova's Gallery scored84%from 54 tests.

About plugin

  • Plugin page: novas-gallery
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.2
  • WordPress version: 6.3.1
  • First release: May 27, 2014
  • Latest release: Apr 26, 2015
  • Number of updates: 20
  • Update frequency: every 16.8 days
  • Top authors: elrond1369 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,705 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.44ms] Passed 4 tests

An overview of server-side resources used by Nova's Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0344.43 ▲3.55
Dashboard /wp-admin3.34 ▼0.0156.59 ▼10.02
Posts /wp-admin/edit.php3.39 ▲0.0352.33 ▲3.23
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.26 ▼6.50
Media Library /wp-admin/upload.php3.26 ▲0.0352.63 ▲17.47

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: 2 new tables, 6 new options
New tables
wp_NGLocal
wp_NGFeeds
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Nova's Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.75 ▲0.382.22 ▲0.5747.25 ▲5.33
Dashboard /wp-admin2,205 ▲285.53 ▼0.1685.54 ▼4.9740.56 ▲4.13
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0136.87 ▼0.9136.39 ▲2.22
Add New Post /wp-admin/post-new.php1,558 ▲2723.17 ▼0.00677.85 ▼19.4559.99 ▼1.59
Media Library /wp-admin/upload.php1,416 ▲194.15 ▼0.09117.64 ▲14.8147.78 ▼1.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/novas-gallery/admin-local.php on line 2
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/novas-gallery/uninstall.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/novas-gallery/uninstall.php:4
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/novas-gallery/admin-local.php on line 2
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/novas-gallery/admin-feeds.php on line 2
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/novas-gallery/admin-feeds.php on line 2
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/novas-gallery/admin-feeds.php on line 51
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/novas-gallery/admin-local.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/novas-gallery/admin-feeds.php:51
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/novas-gallery/admin-local.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: media library, feed, social networking, photo gallery

novas-gallery/novas-gallery.php 92% from 13 tests

The main PHP file in "Nova's Gallery" ver. 1.4.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 170 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 plugin784 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS2426279
JavaScript3144256
PHP449249

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected