84% brexit-countdown

Code Review | Brexit Clock

WordPress plugin Brexit Clock scored84%from 54 tests.

About plugin

  • Plugin page: brexit-countdown
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 30, 2019
  • Latest release: Jul 31, 2019
  • Number of updates: 8
  • Update frequency: every 0.6 days
  • Top authors: drcensor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /645 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Brexit Clock
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.80 ▼5.17
Dashboard /wp-admin3.31 ▲0.0151.32 ▲3.73
Posts /wp-admin/edit.php3.36 ▲0.0047.95 ▲0.48
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.48 ▼8.06
Media Library /wp-admin/upload.php3.23 ▲0.0039.83 ▼1.16

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Brexit Clock
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.34 ▲0.072.26 ▲0.3741.80 ▼1.59
Dashboard /wp-admin2,204 ▲245.57 ▼0.0983.39 ▼10.7637.13 ▼3.85
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0334.03 ▼3.7931.30 ▼2.05
Add New Post /wp-admin/post-new.php1,532 ▲423.24 ▲0.08668.40 ▲40.7266.92 ▲14.49
Media Library /wp-admin/upload.php1,409 ▲64.19 ▼0.04101.27 ▲2.1144.09 ▼1.06

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brexit-countdown/brexit-countdown.php:23

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: events, counter, countdown, timer, brexit

brexit-countdown/brexit-countdown.php 92% from 13 tests

"Brexit Clock" version 1.1.2'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:
  • Description: Please keep the plugin description shorter than 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin94 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2222437
JavaScript2232436
CSS10021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin