68% property-hive-allagents-review-embed

Code Review | Property Hive AllAgents Review Embed

WordPress plugin Property Hive AllAgents Review Embed scored68%from 54 tests.

About plugin

  • Plugin page: property-hive-all...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5.3
  • WordPress version: 6.3.1
  • First release: Dec 3, 2020
  • Latest release: Dec 3, 2020
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: PropertyHive (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /519 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.37ms] Passed 4 tests

A check of server-side resources used by Property Hive AllAgents Review Embed
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1642.80 ▼4.58
Dashboard /wp-admin3.45 ▲0.1549.93 ▼4.01
Posts /wp-admin/edit.php3.57 ▲0.2150.42 ▼1.98
Add New Post /wp-admin/post-new.php6.03 ▲0.1588.04 ▼6.89
Media Library /wp-admin/upload.php3.38 ▲0.1538.93 ▲4.40
AllAgents /wp-admin/options-general.php?page=allagents3.3431.49

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
can_compress_scripts
propertyhive_allagents_version
widget_recent-posts
propertyhive_allagents
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Property Hive AllAgents Review Embed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▲0.061.97 ▲0.0244.22 ▼1.36
Dashboard /wp-admin2,202 ▲255.54 ▼0.1187.96 ▼3.4340.24 ▲0.08
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0635.99 ▼2.1437.23 ▲1.29
Add New Post /wp-admin/post-new.php1,536 ▲1023.08 ▼0.22676.65 ▼15.8659.49 ▲9.43
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.0394.75 ▼11.2443.70 ▼3.58
AllAgents /wp-admin/options-general.php?page=allagents8252.0225.8326.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method PH_AllAgents_Install::uninstall() should not be called statically
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • propertyhive_allagents_version
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-reviews.php
    • > /wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-header.php
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: stars in wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-header.php on line 9
    • > PHP Notice
      Undefined variable: firm_link in wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-header.php on line 3
    • > PHP Notice
      Undefined variable: stars in wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-header.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-footer.php:3
    • > PHP Notice
      Undefined variable: header_background_colour in wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-header.php on line 1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-reviews.php on line 4
    • > PHP Notice
      Undefined variable: stars in wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-header.php on line 9
    • > PHP Notice
      Undefined variable: votes in wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-header.php on line 15
    • > PHP Notice
      Undefined variable: rating in wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-header.php on line 14
    • > PHP Notice
      Undefined variable: stars in wp-content/plugins/property-hive-allagents-review-embed/templates/allagents-header.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: all agents, estate agents, property, real estate, propertyhive...

property-hive-allagents-review-embed/propertyhive-allagents.php 92% from 13 tests

The primary PHP file in "Property Hive AllAgents Review Embed" version 1.0.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("property-hive-allagents-review-embed.php" instead of "propertyhive-allagents.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,073 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6200124942
CSS2171123
JavaScript2008

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity61.50
▷ Minimum class complexity3.00
▷ Maximum class complexity120.00
Average method complexity5.65
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods26
▷ Static methods13.85%
▷ Public methods2284.62%
▷ Protected methods00.00%
▷ Private methods415.38%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/allagents_logo.png5.10KB2.26KB▼ 55.74%