77% badge-creator-free

Code Review | Badge Creator

WordPress plugin Badge Creator scored77%from 54 tests.

About plugin

  • Plugin page: badge-creator-free
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 20, 2017
  • Latest release: Aug 16, 2019
  • Number of updates: 10
  • Update frequency: every 75.7 days
  • Top authors: stangel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,065 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
Installer ran successfully

Server metrics [RAM: ▼0.56MB] [CPU: ▼14.78ms] Passed 4 tests

An overview of server-side resources used by Badge Creator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1339.03 ▲1.90
Dashboard /wp-admin3.43 ▲0.1249.34 ▼2.65
Posts /wp-admin/edit.php3.54 ▲0.1848.36 ▼2.08
Add New Post /wp-admin/post-new.php3.27 ▼2.6134.79 ▼56.28
Media Library /wp-admin/upload.php3.35 ▲0.1238.83 ▲5.78
Badges /wp-admin/edit.php?post_type=badgecreator-badge3.3935.45
New badge /wp-admin/post-new.php?post_type=badgecreator-badge3.2731.63

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Badge Creator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲19214.88 ▲0.5317.23 ▲15.4741.88 ▲1.02
Dashboard /wp-admin2,226 ▲525.64 ▼0.0588.95 ▼0.9538.95 ▼1.30
Posts /wp-admin/edit.php2,148 ▲482.23 ▲0.1939.42 ▲5.4037.03 ▼3.81
Add New Post /wp-admin/post-new.php1,554 ▲2823.59 ▲0.43645.48 ▼34.0348.84 ▼4.90
Media Library /wp-admin/upload.php1,441 ▲444.21 ▲0.0595.98 ▼6.9743.35 ▼2.52
Badges /wp-admin/edit.php?post_type=badgecreator-badge1,1092.1731.5626.98
New badge /wp-admin/post-new.php?post_type=badgecreator-badge1,5272.5550.2645.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=badgecreator-badge
    • > Notice in wp-content/plugins/badge-creator-free/admin/class-badgecreator-admin.php+216
    Undefined index: badgeCreator_noncename
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=badgecreator-badge
    • > Notice in wp-content/plugins/badge-creator-free/admin/class-badgecreator-admin.php+205
    Undefined variable: image_id

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=badgecreator-badge
    • > Network (severe)
    wp-content/plugins/badge-creator-free/admin/js/badgeCreator-admin.js?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=badgecreator-badge
    • > Network (severe)
    wp-content/plugins/badge-creator-free/admin/css/badgeCreator-admin.css?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: There are too many tags (17 tag instead of maximum 10)
  • Screenshots: These screenshots have no corresponding images in /assets: #2 (Screenshot 2), #3 (Screenshot 3), #4 (Screenshot 4), #5 (Screenshot 5), #6 (Screenshot 6), #7 (Screenshot 7), #8 (Screenshot 8), #9 (Screenshot 9)
The official readme.txt is a good inspiration

badge-creator-free/badgecreator.php 85% from 13 tests

"Badge Creator" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("badge-creator-free.php" instead of "badgecreator.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
Success! There were no dangerous files found in this plugin16,468 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript143,5528,16015,781
PHP10171501416
CSS45924271

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.29
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/js/upload/img/border-image.png1.32KB0.23KB▼ 82.41%
public/js/upload/img/icons.png1.36KB0.52KB▼ 62.02%
public/images/Uploadicon.png1.17KB0.92KB▼ 21.47%
public/images/Downloadicon.png1.22KB0.93KB▼ 23.32%