94% era-clock

Code Review | ERA Clock

WordPress plugin ERA Clock scored 94% from 54 tests.

About plugin

  • Plugin page: era-clock
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-5.3.1
  • WordPress version: 5.8.1
  • First release: Dec 22, 2019
  • Latest release: Dec 23, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: wordpressmechanic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 290 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by ERA Clock
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0134.32 ▼0.65
Dashboard /wp-admin3.06 ▲0.0137.56 ▼11.99
Posts /wp-admin/edit.php3.12 ▼0.0044.36 ▼3.85
Add New Post /wp-admin/post-new.php5.42 ▼0.0191.59 ▼546.93
Media Library /wp-admin/upload.php3.01 ▲0.0040.11 ▲8.36

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for ERA Clock
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲5215.88 ▼0.168.33 ▼1.5747.75 ▲1.10
Dashboard /wp-admin2,967 ▲336.07 ▲0.13132.38 ▼19.14116.42 ▲10.81
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0060.49 ▼3.9087.91 ▼1.22
Add New Post /wp-admin/post-new.php1,615 ▼6821.89 ▲3.11272.94 ▼97.65104.59 ▼6.81
Media Library /wp-admin/upload.php1,807 ▼35.03 ▲0.02168.92 ▲25.16134.49 ▲15.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/era-clock/eraClock.php:76

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: clock, shortcode, era

era-clock/eraClock.php 92% from 13 tests

The main PHP file in "ERA Clock" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("era-clock.php" instead of "eraClock.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP114856

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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