84% c4d-woo-badge

Code Review | C4D Woo Bagde

WordPress plugin C4D Woo Bagde scored84%from 54 tests.

About plugin

  • Plugin page: c4d-woo-badge
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Mar 14, 2017
  • Number of updates: 12
  • Update frequency: every 2.1 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /703 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by C4D Woo Bagde
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0742.31 ▲0.16
Dashboard /wp-admin3.37 ▲0.0645.97 ▼5.20
Posts /wp-admin/edit.php3.42 ▲0.0648.15 ▼2.02
Add New Post /wp-admin/post-new.php5.95 ▲0.06100.32 ▲10.88
Media Library /wp-admin/upload.php3.29 ▲0.0632.98 ▼4.37

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

C4D Woo Bagde: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲14013.62 ▼0.765.38 ▲3.5637.67 ▼6.91
Dashboard /wp-admin2,206 ▲185.76 ▲0.8998.21 ▼16.6838.55 ▼7.32
Posts /wp-admin/edit.php2,086 ▼32.06 ▲0.0634.22 ▼6.6334.40 ▲1.42
Add New Post /wp-admin/post-new.php1,533 ▲1323.11 ▼0.01627.34 ▼31.9149.50 ▼1.40
Media Library /wp-admin/upload.php1,385 ▼34.17 ▼0.0496.30 ▼14.1642.50 ▼3.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/c4d-woo-badge/c4d-woo-badge.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (21 tag instead of maximum 10)
The official readme.txt is a good inspiration

c4d-woo-badge/c4d-woo-badge.php Passed 13 tests

Analyzing the main PHP file in "C4D Woo Bagde" version 2.0.0
101 characters long description:
Sale badge with percent or specify amount. Otherwise we provide News Badge, Popular Badge, Sold Badge

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
No dangerous file extensions were detected308 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13211283
Sass10024
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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