84% templatic-badge

Code Review | Post Badges

WordPress plugin Post Badges scored 84% from 54 tests.

About plugin

  • Plugin page: templatic-badge
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0
  • WordPress version: 6.3.1
  • First release: Jun 2, 2016
  • Latest release: Oct 27, 2018
  • Number of updates: 32
  • Update frequency: every 27.4 days
  • Top authors: rbhavesh (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active / 6,586 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
Installer ran successfully

Server metrics [RAM: ▼0.63MB] [CPU: ▼12.88ms] Passed 4 tests

An overview of server-side resources used by Post Badges
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.50 ▲0.08
Dashboard /wp-admin3.36 ▲0.0552.54 ▲2.86
Posts /wp-admin/edit.php3.41 ▲0.0542.73 ▲0.17
Add New Post /wp-admin/post-new.php3.20 ▼2.6840.37 ▼54.62
Media Library /wp-admin/upload.php3.28 ▲0.0536.81 ▲3.73

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Post Badges: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7214.74 ▲0.361.80 ▲0.0845.44 ▲0.87
Dashboard /wp-admin2,206 ▲185.02 ▼0.8999.18 ▼8.6138.03 ▼4.84
Posts /wp-admin/edit.php2,092 ▲62.02 ▲0.0435.13 ▼0.0029.27 ▼6.45
Add New Post /wp-admin/post-new.php6,507 ▲4,98819.98 ▼3.26895.80 ▲248.1859.02 ▲4.01
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0293.22 ▼7.8444.18 ▼1.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/templatic-badge/templatic-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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (This is how you can set the title and color of the Badges and update the post), #2 (This is how to show a little post badge after your WordPress post title)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === templatic-badge === )
Please take inspiration from this readme.txt

templatic-badge/templatic-badge.php Passed 13 tests

The principal PHP file in "Post Badges" v. 1.0.1 is loaded by WordPress automatically on each request
109 characters long description:
This add-on allows you to display a badge on your listings , where you can set label and color for the badge.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected160 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14433123
PO File19937

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.31MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png268.43KB267.01KB▼ 0.53%
screenshot-1.png45.53KB43.83KB▼ 3.73%