10% a2reviews

Code Review | A2Reviews

WordPress plugin A2Reviews scored 10% from 54 tests.

About plugin

  • Plugin page: a2reviews
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.9
  • WordPress version: 5.9.2
  • First release: May 7, 2020
  • Latest release: Feb 7, 2022
  • Number of updates: 20
  • Update frequency: every 35.9 days
  • Top authors: eosvn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 616 total downloads


Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/a2reviews/public/class-a2reviews-public.php+287
    Trying to get property 'widget_position' of non-object

Server metrics [RAM: ▲0.29MB] [CPU: ▲656.58ms] 50% from 4 tests

An overview of server-side resources used by A2Reviews
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 533.57ms on /wp-admin/options-general.php?page=a2reviews-setting-admin)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 656.58ms on /wp-admin/options-general.php?page=a2reviews-setting-admin)
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.321,045.38 ▲982.52
Dashboard /wp-admin3.68 ▲0.271,002.30 ▲945.79
Posts /wp-admin/edit.php3.98 ▲0.34992.02 ▲955.04
Add New Post /wp-admin/post-new.php7.21 ▲0.231,104.99 ▼220.34
Media Library /wp-admin/upload.php3.64 ▲0.34971.70 ▲945.83
A2reviews /wp-admin/options-general.php?page=a2reviews-setting-admin3.62533.57

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 34 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

A2Reviews: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,947 ▲19318.43 ▲2.407.20 ▲0.092.33 ▼1.46
Dashboard /wp-admin3,035 ▲1748.10 ▲1.95174.67 ▲36.14167.48 ▲1.84
Posts /wp-admin/edit.php2,969 ▲2785.47 ▲2.2295.54 ▲30.73202.58 ▲54.43
Add New Post /wp-admin/post-new.php1,746 ▲2919.81 ▼1.35460.82 ▲15.87176.98 ▼30.50
Media Library /wp-admin/upload.php1,862 ▲1677.15 ▲1.67184.85 ▲33.44184.28 ▼85.34
A2reviews /wp-admin/options-general.php?page=a2reviews-setting-admin1,7226.33115.30154.44

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 option in the database
    • a2reviews_options

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 everything seems fine, this is not 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/a2reviews/public/partials/a2reviews-public-display.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/a2reviews/public/class-a2reviews-order.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/a2reviews/admin/partials/a2reviews-admin-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/a2reviews/includes/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/a2reviews/public/partials/feature-reviews.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/a2reviews/public/class-a2reviews-shortcode.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6, #7, #8 in a2reviews/assets to your readme.txt
You can look at the official readme.txt

a2reviews/a2reviews.php Passed 13 tests

"A2Reviews" version 1.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
85 characters long description:
A2Reviews is the best review app for WooCommerce. Smart assessment management system.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,595 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
▷ Static methods46.25%
▷ Public methods4976.56%
▷ Protected methods00.00%
▷ Private methods1523.44%
▷ Named functions416.67%
▷ Anonymous functions2083.33%
▷ Global constants5100.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
PNG images were not found in this plugin