84% bc-imperial-date

Code Review | BC Imperial Date

WordPress plugin BC Imperial Date scored84%from 54 tests.

About plugin

  • Plugin page: bc-imperial-date
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1
  • WordPress version: 6.3.1
  • First release: Mar 22, 2019
  • Latest release: Apr 5, 2019
  • Number of updates: 8
  • Update frequency: every 1.7 days
  • Top authors: ctdc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /672 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.98ms] Passed 4 tests

Server-side resources used by BC Imperial Date
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.14 ▼6.79
Dashboard /wp-admin3.32 ▲0.0240.47 ▼7.69
Posts /wp-admin/edit.php3.37 ▲0.0247.28 ▲0.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.52 ▲4.17
Media Library /wp-admin/upload.php3.24 ▲0.0136.24 ▼2.12

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by BC Imperial Date
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.59 ▼1.091.61 ▼0.3437.67 ▼5.67
Dashboard /wp-admin2,206 ▲235.88 ▲0.93112.04 ▲5.8142.94 ▲0.10
Posts /wp-admin/edit.php2,089 ▼31.97 ▼0.0435.52 ▼3.8434.60 ▼2.47
Add New Post /wp-admin/post-new.php1,514 ▼2017.63 ▼5.46623.36 ▼7.9548.90 ▼0.90
Media Library /wp-admin/upload.php1,385 ▼64.17 ▼0.0597.87 ▼6.5240.74 ▼3.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bc-imperial-date/bc-imperial-date.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (Settings) image missing
The official readme.txt is a good inspiration

bc-imperial-date/bc-imperial-date.php 92% from 13 tests

The main PHP script in "BC Imperial Date" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 228 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin122 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14543122

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected