84% recotrust-integration

Code Review | Recotrust

WordPress plugin Recotrust scored84%from 54 tests.

About plugin

  • Plugin page: recotrust-integra...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.4.2
  • WordPress version: 6.3.1
  • First release: Jun 5, 2018
  • Latest release: Jun 23, 2020
  • Number of updates: 20
  • Update frequency: every 37.5 days
  • Top authors: recotrust (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,229 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.06MB] [CPU: ▼5.74ms] Passed 4 tests

This is a short check of server-side resources used by Recotrust
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.93 ▼0.5319.46 ▼21.13
Dashboard /wp-admin3.40 ▲0.0945.15 ▼3.90
Posts /wp-admin/edit.php3.51 ▲0.1647.02 ▲0.61
Add New Post /wp-admin/post-new.php5.98 ▲0.0991.57 ▲1.45
Media Library /wp-admin/upload.php3.32 ▲0.0936.05 ▲3.20

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_ac_reco_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Recotrust
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,456 ▼27913.61 ▼0.550.50 ▼1.3417.73 ▼26.22
Dashboard /wp-admin2,209 ▲244.83 ▼1.06111.45 ▲8.3241.32 ▲4.39
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0540.68 ▲6.8535.25 ▼1.54
Add New Post /wp-admin/post-new.php1,542 ▼118.24 ▼0.01616.09 ▼41.9262.00 ▼6.69
Media Library /wp-admin/upload.php1,391 ▼04.23 ▲0.0297.51 ▼4.9742.34 ▼1.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_ac_reco_widget
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/recotrust-integration/ac-reco-plugin.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/recotrust-integration/includes/class-ac-reco-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% 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
6 plugin tags: recommendations, wordpress, reviews, ratings, woocommerce...

recotrust-integration/ac-reco-plugin.php 92% from 13 tests

The entry point to "Recotrust" version 1.0.6 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("recotrust-integration.php" instead of "ac-reco-plugin.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
No dangerous file extensions were detected473 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP569171326
PO File1283178
SVG20136
JSON10028
CSS1004
JavaScript1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.50
▷ Minimum class complexity2.00
▷ Maximum class complexity10.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes250.00%
Methods23
▷ Static methods834.78%
▷ Public methods2086.96%
▷ Protected methods14.35%
▷ Private methods28.70%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin