83% timelimit-add-on-for-badgeos

Code Review | BadgeOS Timelimit Add-on

WordPress plugin BadgeOS Timelimit Add-on scored 83% from 54 tests.

About plugin

  • Plugin page: timelimit-add-on-...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 1, 2016
  • Latest release: Jun 8, 2016
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: konnektiv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,098 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.99ms] Passed 4 tests

Analyzing server-side resources used by BadgeOS Timelimit Add-on
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.00 ▼6.55
Dashboard /wp-admin3.31 ▲0.0045.36 ▼5.13
Posts /wp-admin/edit.php3.36 ▲0.0043.54 ▼1.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.17 ▼15.04
Media Library /wp-admin/upload.php3.23 ▲0.0034.23 ▼0.47

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

BadgeOS Timelimit Add-on: 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.47 ▲0.251.77 ▼0.2041.18 ▼4.36
Dashboard /wp-admin2,206 ▲155.80 ▲0.77103.51 ▼1.5941.02 ▼6.86
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0437.33 ▼0.3035.91 ▲0.56
Add New Post /wp-admin/post-new.php1,514 ▼2017.69 ▼5.53648.15 ▼33.3450.96 ▼12.35
Media Library /wp-admin/upload.php1,388 ▲64.26 ▲0.0195.33 ▼47.2741.66 ▼22.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/timelimit-add-on-for-badgeos/includes/actions-filters.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/timelimit-add-on-for-badgeos/badgeos-timelimit.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires at least: Version not formatted correctly
The official readme.txt is a good inspiration

timelimit-add-on-for-badgeos/badgeos-timelimit.php 92% from 13 tests

The principal PHP file in "BadgeOS Timelimit Add-on" v. 1.0.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("timelimit-add-on-for-badgeos.php" instead of "badgeos-timelimit.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin89 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2286170
JSON10019

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
There were not PNG files found in your plugin