10% xorbin-analog-flash-clock

Code Review | Xorbin Analog Flash Clock

WordPress plugin Xorbin Analog Flash Clock scored 10% from 53 tests.

About plugin

  • Plugin page: xorbin-analog-fla...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.9.1
  • WordPress version: 5.8.1
  • First release: May 2, 2012
  • Latest release: Jul 2, 2014
  • Number of updates: 15
  • Update frequency: every 52.9 days
  • Top authors: xorbin (100%)

Code review

53 tests

User reviews

1 review

Install metrics

200+ active / 11,713 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/xorbin-analog-flash-clock/xorbin-analog-flash-clock.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; XorAnalogClockWidget has a deprecated constructor

Server metrics [RAM: ▼1.75MB] [CPU: ▼391.88ms] Passed 4 tests

A check of server-side resources used by Xorbin Analog Flash Clock
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.88 ▼0.845.25 ▼16.00
Dashboard /wp-admin1.89 ▼1.168.49 ▼37.50
Posts /wp-admin/edit.php1.89 ▼1.215.75 ▼34.67
Add New Post /wp-admin/post-new.php1.89 ▼3.546.80 ▼1,462.71
Media Library /wp-admin/upload.php1.89 ▼1.115.98 ▼32.65

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 1 new option
New WordPress options
widget_xoranalogclockwidget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Xorbin Analog Flash Clock
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,782 ▲17616.33 ▲0.7812.62 ▲3.0744.50 ▼0.53
Dashboard /wp-admin2,934 ▲815.94 ▲0.09142.04 ▲10.8597.54 ▼2.47
Posts /wp-admin/edit.php2,706 ▼02.69 ▲0.0063.84 ▼4.4789.14 ▲0.42
Add New Post /wp-admin/post-new.php1,481 ▼018.57 ▲0.09357.79 ▼7.86110.03 ▼1.05
Media Library /wp-admin/upload.php1,772 ▼05.00 ▲0.01153.79 ▼11.77110.16 ▼0.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/xorbin-analog-flash-clock/xorbin-analog-flash-clock.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; XorAnalogClockWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_xoranalogclockwidget

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)
Even though no errors were found, 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/xorbin-analog-flash-clock/xorbin-analog-flash-clock.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (You can configure your clock by adding widget to your sidebar.), #2 (Select clock skin (face) from 16 widget's images or add your own.), #3 (Choose 12 various arrow types by changing Arrows skin parameter.)
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

xorbin-analog-flash-clock/xorbin-analog-flash-clock.php Passed 13 tests

The entry point to "Xorbin Analog Flash Clock" version 1.0.2 is a PHP file that has certain tags in its header comment area
40 characters long description:
Customizable Analog Clock by XorBin.com.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin160 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1339159
JavaScript1031

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity8.75
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.26MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/analog_clock_by_xorbin.png0.82KB0.47KB▼ 43.10%
media/skins/skin015.png11.30KB6.35KB▼ 43.85%
screenshot-1.png18.14KB8.87KB▼ 51.09%
media/skins/skin011.png18.67KB8.72KB▼ 53.30%
media/skins/skin004.png35.28KB12.06KB▼ 65.83%