83% ehive-objects-gallery-widget

Code Review | eHive Objects Gallery widget

WordPress plugin eHive Objects Gallery widget scored 83% from 54 tests.

About plugin

  • Plugin page: ehive-objects-gal...
  • Plugin version: 2.4.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.0
  • WordPress version: 6.3.1
  • First release: Apr 18, 2013
  • Latest release: Jun 1, 2022
  • Number of updates: 32
  • Update frequency: every 104.1 days
  • Top authors: vernonsystems (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,144 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
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼8.51ms] Passed 4 tests

Server-side resources used by eHive Objects Gallery widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1844.55 ▼3.28
Dashboard /wp-admin3.49 ▲0.1848.63 ▼8.05
Posts /wp-admin/edit.php3.54 ▲0.1847.67 ▼6.41
Add New Post /wp-admin/post-new.php6.07 ▲0.1883.20 ▼16.28
Media Library /wp-admin/upload.php3.41 ▲0.1836.33 ▲2.88

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

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

Browser metrics Passed 4 tests

Checking browser requirements for eHive Objects Gallery widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.47 ▲0.041.73 ▼0.5243.55 ▲0.00
Dashboard /wp-admin2,206 ▲185.85 ▲0.94102.72 ▼5.9038.66 ▼12.71
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0739.23 ▼1.4034.27 ▼3.18
Add New Post /wp-admin/post-new.php1,536 ▲823.13 ▲4.97627.51 ▲16.4851.99 ▼11.35
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0497.26 ▼9.3639.81 ▼7.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_ehiveobjectsgallery_widget
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× 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/ehive-objects-gallery-widget/EHiveObjectsGallery_Widget.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: ehive, archive, museum, history, collection

ehive-objects-gallery-widget/EHiveObjectsGallery_Widget.php 85% from 13 tests

The principal PHP file in "eHive Objects Gallery widget" v. 2.4.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 201 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("ehive-objects-gallery-widget.php" instead of "EHiveObjectsGallery_Widget.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin811 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP114028749
XML30040
JavaScript13012
CSS15148
INI1002

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 148)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity195.00
▷ Minimum class complexity195.00
▷ Maximum class complexity195.00
Average method complexity28.71
▷ Minimum method complexity1.00
▷ Maximum method complexity148.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods457.14%
▷ Protected methods00.00%
▷ Private methods342.86%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin