77% wpreviewer

Code Review | Reviewer

WordPress plugin Reviewer scored77%from 54 tests.

About plugin

  • Plugin page: wpreviewer
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.8.1
  • WordPress version: 6.3.1
  • First release: Aug 22, 2016
  • Latest release: Sep 20, 2017
  • Number of updates: 15
  • Update frequency: every 26.1 days
  • Top authors: sormano (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active /4,602 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.65ms] 75% from 4 tests

An overview of server-side resources used by Reviewer
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 531.23ms on /wp-admin/admin.php?page=reviewer-extensions)
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1346.27 ▲1.44
Dashboard /wp-admin3.43 ▲0.1351.46 ▼1.54
Posts /wp-admin/edit.php3.55 ▲0.2052.53 ▲1.27
Add New Post /wp-admin/post-new.php6.03 ▲0.1583.28 ▼3.78
Media Library /wp-admin/upload.php3.35 ▲0.1341.03 ▲4.23
Extensions /wp-admin/admin.php?page=reviewer-extensions3.39531.23
Add new Review /wp-admin/post-new.php?post_type=review3.5856.27
Settings /wp-admin/admin.php?page=reviewer3.3633.78
Tags /wp-admin/edit-tags.php?taxonomy=review_tag3.3528.32
Categories /wp-admin/edit-tags.php?taxonomy=review_category3.3537.27
Reviews /wp-admin/edit.php?post_type=review3.4139.30

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 79 new files
Database: no new tables, 13 new options
New WordPress options
reviewer_review_image_size
widget_review_list
widget_review_search
widget_recent-posts
can_compress_scripts
reviewer_archive_image_size
widget_review_categories
reviewer_rating_step
reviewer_max_rating
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for Reviewer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲9314.81 ▲0.401.79 ▼0.3244.89 ▲1.47
Dashboard /wp-admin2,264 ▲825.84 ▲0.94107.42 ▼8.7341.31 ▼3.55
Posts /wp-admin/edit.php2,149 ▲602.06 ▲0.0641.32 ▲5.7337.19 ▼0.10
Add New Post /wp-admin/post-new.php1,586 ▲6723.24 ▲0.08701.04 ▲24.0356.88 ▼5.77
Media Library /wp-admin/upload.php1,446 ▲584.26 ▼0.07109.79 ▲8.5949.16 ▲3.98
Extensions /wp-admin/admin.php?page=reviewer-extensions9051.9328.9727.81
Add new Review /wp-admin/post-new.php?post_type=review3,2139.40202.9379.36
Settings /wp-admin/admin.php?page=reviewer1,0011.9327.8425.25
Tags /wp-admin/edit-tags.php?taxonomy=review_tag1,2982.3027.8930.48
Categories /wp-admin/edit-tags.php?taxonomy=review_category1,3202.3027.9331.03
Reviews /wp-admin/edit.php?post_type=review1,2502.1834.7832.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 13 options in the database
    • theysaidso_admin_options
    • widget_review_search
    • reviewer_rating_step
    • db_upgraded
    • reviewer_max_rating
    • widget_recent-comments
    • can_compress_scripts
    • widget_review_list
    • widget_theysaidso_widget
    • widget_recent-posts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wpreviewer/includes/admin/meta-boxes/views/review-details-tab-tags.php
    • > /wp-content/plugins/wpreviewer/includes/admin/meta-boxes/views/review-details-tab-categories.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wpreviewer/includes/admin/meta-boxes/views/review-details-tab-general.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wpreviewer/includes/admin/meta-boxes/views/review-details-tab-attributes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/wpreviewer/includes/admin/views/system-status-report.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wpreviewer/includes/admin/views/extensions.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please describe screenshot #9 in wpreviewer/assets to your readme.txt
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

wpreviewer/reviewer.php 85% from 13 tests

Analyzing the main PHP file in "Reviewer" version 1.0.5
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpreviewer.php" instead of "reviewer.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
No dangerous file extensions were detected4,579 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP551,2031,7602,337
Sass612615816
JavaScript89843710
CSS4168461
PO File191108218
YAML10336
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.62
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes16
▷ Abstract classes425.00%
▷ Concrete classes1275.00%
▷ Final classes00.00%
Methods89
▷ Static methods22.25%
▷ Public methods8393.26%
▷ Protected methods00.00%
▷ Private methods66.74%
Functions54
▷ Named functions5398.15%
▷ Anonymous functions11.85%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected