84% ehive-object-details

Code Review | eHive Object Details

WordPress plugin eHive Object Details scored84%from 54 tests.

About plugin

  • Plugin page: ehive-object-details
  • Plugin version: 2.4.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 16, 2013
  • Latest release: Oct 9, 2023
  • Number of updates: 58
  • Update frequency: every 66.0 days
  • Top authors: vernonsystems (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,622 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼11.32ms] Passed 4 tests

Analyzing server-side resources used by eHive Object Details
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.25 ▼3.25
Dashboard /wp-admin3.40 ▲0.0542.61 ▼17.65
Posts /wp-admin/edit.php3.51 ▲0.1545.20 ▼5.97
Add New Post /wp-admin/post-new.php5.98 ▲0.0979.95 ▼18.40
Media Library /wp-admin/upload.php3.32 ▲0.0935.56 ▼1.41

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 92 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by eHive Object Details
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.33 ▼0.061.56 ▼0.1137.18 ▼6.56
Dashboard /wp-admin2,195 ▲185.60 ▲0.0280.85 ▼7.2037.01 ▼4.04
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0540.81 ▲6.3136.50 ▲0.88
Add New Post /wp-admin/post-new.php1,528 ▼323.29 ▲0.36669.51 ▼9.2867.42 ▲14.94
Media Library /wp-admin/upload.php1,397 ▼34.22 ▲0.06103.03 ▲4.9944.96 ▼1.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function getMediaSetByIdentifier() on null in wp-content/plugins/ehive-object-details/templates/eHiveObjectDetails.php:75
    • > PHP Notice
      Undefined variable: css_class in wp-content/plugins/ehive-object-details/templates/eHiveObjectDetails.php on line 19
    • > PHP Notice
      Undefined variable: object in wp-content/plugins/ehive-object-details/templates/eHiveObjectDetails.php on line 75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ehive-object-details/EHiveObjectDetails.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: ehive, collection, museum, history, archive

ehive-object-details/EHiveObjectDetails.php 85% from 13 tests

The principal PHP file in "eHive Object Details" v. 2.4.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ehive-object-details.php" instead of "EHiveObjectDetails.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 detected1,316 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP317992748
CSS22727332
HTML2345202
JavaScript311634

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity70.00
▷ Minimum class complexity70.00
▷ Maximum class complexity70.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
54 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/prettyPhoto_compressed_3.1.6/images/prettyPhoto/default/sprite_prev.png1.34KB0.38KB▼ 71.73%
js/prettyPhoto_compressed_3.1.6/images/prettyPhoto/facebook/contentPatternBottom.png0.14KB0.11KB▼ 21.13%
images/delete.png0.70KB0.72KB0.00%
images/creative-commons/by-nd.png4.45KB2.42KB▼ 45.61%
images/creative-commons/by-nc-sa.png5.84KB2.88KB▼ 50.65%