77% report-bad-buyers-and-screen-new-ones

Code Review | Report Bad Buyers and Screen New Ones

WordPress plugin Report Bad Buyers and Screen New Ones scored77%from 54 tests.

About plugin

  • Plugin page: report-bad-buyers...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Oct 14, 2016
  • Latest release: Jan 13, 2017
  • Number of updates: 13
  • Update frequency: every 7.5 days
  • Top authors: ebuyersreviewed (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /960 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.56ms] Passed 4 tests

A check of server-side resources used by Report Bad Buyers and Screen New Ones
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.30 ▼3.89
Dashboard /wp-admin3.31 ▲0.0145.33 ▼1.70
Posts /wp-admin/edit.php3.36 ▲0.0148.43 ▼4.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.78 ▼8.96
Media Library /wp-admin/upload.php3.23 ▲0.0032.26 ▼9.35

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

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

Browser metrics Passed 4 tests

Report Bad Buyers and Screen New Ones: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲11913.53 ▼0.861.96 ▲0.0944.82 ▼6.77
Dashboard /wp-admin2,218 ▲305.81 ▲0.92102.16 ▼5.9039.23 ▼3.21
Posts /wp-admin/edit.php2,110 ▲212.04 ▲0.0539.96 ▼0.8937.16 ▲3.93
Add New Post /wp-admin/post-new.php1,432 ▼9117.17 ▼6.15509.52 ▼152.1238.67 ▼16.97
Media Library /wp-admin/upload.php1,400 ▲124.26 ▲0.0196.67 ▼9.0938.61 ▼6.41

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 did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/report-bad-buyers-and-screen-new-ones/public/partials/ebuyers-reviewed-public-display.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Ebuyers_Reviewed_Admin' not found in wp-content/plugins/report-bad-buyers-and-screen-new-ones/admin/class-ebuyers-reviewed-admin-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/report-bad-buyers-and-screen-new-ones/admin/partials/ebuyers-reviewed-admin-review-meta-box.php:32
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/report-bad-buyers-and-screen-new-ones/admin/partials/ebuyers-reviewed-admin-screen-meta-box.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/report-bad-buyers-and-screen-new-ones/admin/form.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% 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:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === report-bad-buyers-and-screen-new-ones === )
The official readme.txt is a good inspiration

report-bad-buyers-and-screen-new-ones/ebuyersreviewed.php 77% from 13 tests

The main PHP file in "Report Bad Buyers and Screen New Ones" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("report-bad-buyers-and-screen-new-ones.php" instead of "ebuyersreviewed.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 1280 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected4,647 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP163186882,028
CSS347361,352
JavaScript42491991,267

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.62
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods53
▷ Static methods23.77%
▷ Public methods4177.36%
▷ Protected methods47.55%
▷ Private methods815.09%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
16 PNG files occupy 1.13MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/ebuyers-sprite.png53.18KB15.53KB▼ 70.80%
admin/images/success-icon.png2.32KB1.26KB▼ 45.97%
assets/screenshot-1.png43.64KB23.64KB▼ 45.84%
admin/images/detailed-report.png481.76KB307.83KB▼ 36.10%
assets/screenshot-5.png103.84KB35.82KB▼ 65.50%