84% that-was-helpful

Code Review | That Was Helpful

WordPress plugin That Was Helpful scored84%from 54 tests.

About plugin

  • Plugin page: that-was-helpful
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Aug 13, 2015
  • Latest release: Sep 25, 2015
  • Number of updates: 4
  • Update frequency: every 10.8 days
  • Top authors: ipm-frommen (75%)tfrommen (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /723 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.12MB] [CPU: ▼3.08ms] Passed 4 tests

This is a short check of server-side resources used by That Was Helpful
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1234.79 ▼5.48
Dashboard /wp-admin3.42 ▲0.1245.88 ▼3.02
Posts /wp-admin/edit.php3.53 ▲0.1850.77 ▲0.73
Add New Post /wp-admin/post-new.php6.00 ▲0.1291.19 ▼4.54
Media Library /wp-admin/upload.php3.34 ▲0.1235.84 ▲2.34
That Was Helpful /wp-admin/options-general.php?page=that_was_helpful3.3132.65

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
that_was_helpful_version
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

That Was Helpful: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.30 ▼1.351.49 ▼0.2937.22 ▼11.95
Dashboard /wp-admin2,213 ▲255.86 ▲0.75101.50 ▲1.1239.42 ▼0.86
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0139.26 ▼2.5834.62 ▼0.10
Add New Post /wp-admin/post-new.php1,536 ▲2223.27 ▲5.64658.63 ▼43.3449.17 ▼8.17
Media Library /wp-admin/upload.php1,395 ▲44.22 ▲0.0497.72 ▲1.8740.26 ▼0.44
That Was Helpful /wp-admin/options-general.php?page=that_was_helpful8132.0625.0325.26

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • that_was_helpful_version
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Interface 'tfrommen\\Autoloader\\Rule' not found in wp-content/plugins/that-was-helpful/inc/Autoloader/NamespaceRule.php:10

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: The official readme.txt is a good inspiration

that-was-helpful/that-was-helpful.php Passed 13 tests

The main PHP file in "That Was Helpful" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
50 characters long description:
Find out what posts logged-in users found helpful.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected773 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP23320602676
JavaScript211145
PO File1101437
CSS22015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.14
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods60
▷ Static methods35.00%
▷ Public methods5693.33%
▷ Protected methods00.00%
▷ Private methods46.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin