72% author-hreview

Code Review | Author hReview

WordPress plugin Author hReview scored72%from 54 tests.

About plugin

  • Plugin page: author-hreview
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Jan 26, 2012
  • Latest release: Oct 17, 2017
  • Number of updates: 146
  • Update frequency: every 14.3 days
  • Top authors: hishaman (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

600+ active /70,822 total downloads

Benchmarks

Plugin footprint 82% 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.03MB] [CPU: ▼1.94ms] 75% from 4 tests

Server-side resources used by Author hReview
The following require your attention
  • CPU: The total CPU usage must kept under 500.00ms (currently 644.96ms on /wp-admin/admin.php?page=author-hreview-news)
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0443.78 ▲2.63
Dashboard /wp-admin3.34 ▲0.0346.95 ▼2.23
Posts /wp-admin/edit.php3.39 ▲0.0347.58 ▲1.71
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.38 ▼8.92
Media Library /wp-admin/upload.php3.26 ▲0.0335.08 ▲1.67
Settings /wp-admin/admin.php?page=authorhreview3.2829.23
Blog News /wp-admin/admin.php?page=author-hreview-news5.42644.96

Server storage [IO: ▲0.69MB] [DB: ▲0.24MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 44 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_recent-reviews
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Author hReview: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲9113.16 ▼1.241.66 ▼0.4544.99 ▼0.22
Dashboard /wp-admin2,227 ▲395.86 ▼0.01102.90 ▼14.0966.37 ▲19.49
Posts /wp-admin/edit.php2,127 ▲381.98 ▲0.0140.11 ▲4.1135.50 ▲0.50
Add New Post /wp-admin/post-new.php6,424 ▲4,89119.28 ▼4.00997.00 ▲324.9070.66 ▲5.74
Media Library /wp-admin/upload.php1,409 ▲244.22 ▲0.0099.42 ▼0.9668.60 ▲21.30
Settings /wp-admin/admin.php?page=authorhreview1,3526.73209.3345.97
Blog News /wp-admin/admin.php?page=author-hreview-news9882.1524.5027.67

Uninstaller [IO: ▲0.00MB] [DB: ▲0.24MB] 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 7 options in the database
    • can_compress_scripts
    • widget_recent-reviews
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=authorhreview
    • > Notice in wp-content/plugins/author-hreview/include/admin/settings_general.php+92
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/author-hreview/include/options.php:26

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=authorhreview
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (29 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

author-hreview/author-hreview.php Passed 13 tests

Analyzing the main PHP file in "Author hReview" version 1.0
64 characters long description:
Add support for hReview and AggregateRating based on schema.org.

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,362 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP112762771,045
CSS21819317

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 0.62MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/price.png2.29KB1.82KB▼ 20.69%
images/bg_button.png1.10KB0.49KB▼ 55.36%
images/wpar_icon_32.png2.03KB1.42KB▼ 30.15%
screenshot-8.png181.12KB66.02KB▼ 63.55%
screenshot-6.png28.49KB10.57KB▼ 62.89%