83% home-badges

Code Review | Home Badges

WordPress plugin Home Badges scored83%from 54 tests.

About plugin

  • Plugin page: home-badges
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Dec 7, 2012
  • Latest release: Apr 14, 2013
  • Number of updates: 12
  • Update frequency: every 11.0 days
  • Top authors: global_1981 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,269 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.42ms] Passed 4 tests

A check of server-side resources used by Home Badges
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.71 ▼4.58
Dashboard /wp-admin3.33 ▲0.0350.34 ▲1.13
Posts /wp-admin/edit.php3.38 ▲0.0346.69 ▼4.83
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.03 ▼13.15
Media Library /wp-admin/upload.php3.25 ▲0.0236.78 ▲0.90

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Home Badges
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲3014.27 ▼0.371.90 ▲0.1443.07 ▼5.27
Dashboard /wp-admin2,197 ▲205.58 ▼0.0989.82 ▲5.4738.15 ▼3.39
Posts /wp-admin/edit.php2,105 ▲51.97 ▼0.1140.17 ▲0.4435.82 ▲1.32
Add New Post /wp-admin/post-new.php1,528 ▼323.62 ▲0.60709.30 ▲2.2456.80 ▲2.86
Media Library /wp-admin/upload.php1,405 ▲114.20 ▲0.04103.35 ▲1.6146.91 ▲0.49

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/home-badges/index.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Invalid url: "bcooling.com.au/projects/home-badges/"
  • Screenshots: Please add an image for screenshot #1 (Elegant icons to identify the front and posts page are displayed on the manage pages screen)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === home-badges === )
The official readme.txt is a good inspiration

home-badges/index.php 92% from 13 tests

The entry point to "Home Badges" version 0.6 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("home-badges.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin358 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
HTML101126
CSS251379
PHP2201777
SVG20044
JavaScript11127
Markdown1205

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
home-badges.png8.19KB3.07KB▼ 62.51%
screenshot-1.png20.10KB4.68KB▼ 76.73%