84% wooreports-free

Code Review | WooReports API

WordPress plugin WooReports API scored84%from 54 tests.

About plugin

  • Plugin page: wooreports-free
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.7.4
  • WordPress version: 6.3.1
  • First release: Aug 19, 2015
  • Latest release: Apr 23, 2017
  • Number of updates: 38
  • Update frequency: every 16.2 days
  • Top authors: luciancapdefier (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /3,615 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.21ms] Passed 4 tests

This is a short check of server-side resources used by WooReports API
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.45 ▼0.30
Dashboard /wp-admin3.31 ▲0.0046.46 ▼6.46
Posts /wp-admin/edit.php3.36 ▲0.0046.99 ▼3.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.20 ▼10.74
Media Library /wp-admin/upload.php3.23 ▲0.0038.66 ▲8.37

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

WooReports API: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.44 ▲0.141.81 ▲0.0540.14 ▼0.79
Dashboard /wp-admin2,206 ▲184.87 ▼0.93112.15 ▼2.1636.55 ▼7.02
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0439.55 ▼1.5934.77 ▲0.11
Add New Post /wp-admin/post-new.php1,533 ▲1923.14 ▲5.57586.87 ▼27.4449.68 ▼4.00
Media Library /wp-admin/upload.php1,388 ▲34.39 ▲0.17103.00 ▼0.2443.12 ▼4.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/wooreports-free/includes/class-wcwr-wc-integration.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

wooreports-free/wooreports-free.php 92% from 13 tests

The entry point to "WooReports API" version 2.0.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • 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 considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,315 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP91681751,315

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.28
Average class complexity9.38
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
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 images were found in this plugin