68% apsense-brand-badge

Code Review | APSense.com Brand Badge

WordPress plugin APSense.com Brand Badge scored68%from 54 tests.

About plugin

  • Plugin page: apsense-brand-badge
  • Plugin version: 3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.5
  • WordPress version: 6.3.1
  • First release: Jan 10, 2013
  • Latest release: Jan 15, 2013
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: apsense (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,476 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.96MB] [CPU: ▼38.31ms] Passed 4 tests

Analyzing server-side resources used by APSense.com Brand Badge
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0823.22 ▼18.19
Dashboard /wp-admin3.00 ▼0.3523.60 ▼34.21
Posts /wp-admin/edit.php3.00 ▼0.3625.33 ▼17.03
Add New Post /wp-admin/post-new.php3.00 ▼2.8923.90 ▼83.80
Media Library /wp-admin/upload.php3.00 ▼0.2321.67 ▼16.42
/wp-admin/options-general.php?page=apsense-brand-badge/apsense-brand-badge.php3.0023.98

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for APSense.com Brand Badge
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲3114.24 ▼0.031.91 ▲0.0238.05 ▼5.45
Dashboard /wp-admin2,201 ▲245.60 ▼0.0490.95 ▲3.0848.31 ▲12.95
Posts /wp-admin/edit.php2,106 ▲61.99 ▲0.0043.08 ▲2.0136.53 ▼1.44
Add New Post /wp-admin/post-new.php1,530 ▼523.08 ▲4.80616.76 ▼44.5459.58 ▼9.79
Media Library /wp-admin/upload.php1,406 ▲34.13 ▼0.0597.80 ▼3.9341.77 ▲0.80
/wp-admin/options-general.php?page=apsense-brand-badge/apsense-brand-badge.php8462.0624.4726.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=apsense-brand-badge/apsense-brand-badge.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/options-general.php?page=apsense-brand-badge/apsense-brand-badge.php
    • > Notice in wp-content/plugins/apsense-brand-badge/apsense-brand-badge.php+56
    Undefined index: brand_type

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/apsense-brand-badge/apsense-brand-badge.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: brand badge, apsense widgets, apsense, brand page

apsense-brand-badge/apsense-brand-badge.php 85% from 13 tests

"APSense.com Brand Badge" version 3.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected140 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13717140

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected