94% ab-human-time

Code Review | AB Human Time

WordPress plugin AB Human Time scored 94% from 54 tests.

About plugin

  • Plugin page: ab-human-time
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-3.8.1
  • WordPress version: 5.8.1
  • First release: Feb 28, 2014
  • Latest release: Mar 1, 2014
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: endrix.develop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 852 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by AB Human Time
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.99 ▲11.17
Dashboard /wp-admin3.06 ▲0.0154.33 ▲4.45
Posts /wp-admin/edit.php3.12 ▲0.0149.74 ▲1.61
Add New Post /wp-admin/post-new.php5.42 ▼0.0198.43 ▼567.35
Media Library /wp-admin/upload.php3.01 ▲0.0136.37 ▲1.00

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for AB Human Time
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,706 ▲11015.87 ▲0.3110.98 ▼0.5148.19 ▼6.53
Dashboard /wp-admin2,970 ▲396.09 ▲0.16150.92 ▼2.26109.36 ▼10.16
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0065.67 ▼10.6193.96 ▼1.28
Add New Post /wp-admin/post-new.php1,676 ▲9518.86 ▼1.56398.30 ▼1.48115.01 ▼14.91
Media Library /wp-admin/upload.php1,807 ▼04.99 ▼0.05155.99 ▼7.30124.68 ▲9.28

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ab-human-time/ab-human-time.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: display, time, posts

ab-human-time/ab-human-time.php Passed 13 tests

The principal PHP file in "AB Human Time" v. 0.1 is loaded by WordPress automatically on each request
89 characters long description:
This plugin shows the time elapsed since a post was published in a human readable format.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected54 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1102937
PO File12517

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/screenshot.png0.72KB0.62KB▼ 13.43%
images/ab_clock12x12.png0.35KB0.28KB▼ 20.33%
images/ab_clock16x16.png0.55KB0.44KB▼ 19.93%