84% collect-reviews-integration

Code Review | Collect reviews integration plugin

WordPress plugin Collect reviews integration plugin scored84%from 54 tests.

About plugin

  • Plugin page: collect-reviews-i...
  • Plugin version: 0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2.3
  • WordPress version: 6.3.1
  • First release: Dec 25, 2019
  • Latest release: Dec 25, 2019
  • Number of updates: 2
  • Update frequency: every 8.5 days
  • Top authors: collectreviews (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /414 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.94ms] Passed 4 tests

Server-side resources used by Collect reviews integration plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.77 ▼1.12
Dashboard /wp-admin3.35 ▲0.0552.34 ▼2.94
Posts /wp-admin/edit.php3.47 ▲0.1151.03 ▼2.01
Add New Post /wp-admin/post-new.php5.93 ▲0.0588.16 ▼9.67
Media Library /wp-admin/upload.php3.28 ▲0.0539.46 ▲2.79
Collect Reviews Settings /wp-admin/options-general.php?page=collectr_settings_page3.2434.37

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Collect reviews integration plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3314.41 ▼0.161.75 ▼0.5342.76 ▼2.80
Dashboard /wp-admin2,228 ▲224.86 ▼1.01105.12 ▼40.8540.28 ▼19.02
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0537.74 ▼0.7431.37 ▼5.68
Add New Post /wp-admin/post-new.php1,548 ▲1623.26 ▲0.12681.58 ▲50.8169.86 ▲13.15
Media Library /wp-admin/upload.php1,404 ▲44.20 ▼0.07111.88 ▲2.9244.91 ▼6.27
Collect Reviews Settings /wp-admin/options-general.php?page=collectr_settings_page8372.0625.8629.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/collect-reviews-integration/collectreviews.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === collect-reviews-integration === )
The official readme.txt might help

collect-reviews-integration/collectreviews.php 92% from 13 tests

The main PHP file in "Collect reviews integration plugin" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("collect-reviews-integration.php" instead of "collectreviews.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected197 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26437197

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods350.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected