10% olimometer

Code Review | Olimometer

WordPress plugin Olimometer scored 10% from 54 tests.

About plugin

  • Plugin page: olimometer
  • Plugin version: 2.57
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.5
  • WordPress version: 5.9.2
  • First release: Mar 5, 2011
  • Latest release: Nov 14, 2016
  • Number of updates: 163
  • Update frequency: every 12.8 days
  • Top authors: oshingler (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active / 45,441 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/olimometer/olimometer.php+1191
    Function create_function() is deprecated

Server metrics [RAM: ▼2.11MB] [CPU: ▼347.19ms] Passed 4 tests

Analyzing server-side resources used by Olimometer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.265.66 ▼50.56
Dashboard /wp-admin2.27 ▼1.135.70 ▼28.20
Posts /wp-admin/edit.php2.28 ▼1.375.55 ▼31.49
Add New Post /wp-admin/post-new.php2.27 ▼4.705.26 ▼1,278.49
Media Library /wp-admin/upload.php2.27 ▼1.024.79 ▼20.66
Olimometer /wp-admin/options-general.php?page=olimometer_manage2.284.96

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 51 new files
Database: 1 new table, 5 new options
New tables
wp_olimometer_olimometers
New WordPress options
olimometer_updated_to_two
widget_olimometerwidget
olimometer_skins_custom_location
olimometer_db_version
olimometer_skins_location

Browser metrics Passed 4 tests

This is an overview of browser requirements for Olimometer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,934 ▲18016.30 ▲0.556.40 ▲0.131.97 ▼0.67
Dashboard /wp-admin3,063 ▲2026.16 ▼0.01121.87 ▼17.37165.45 ▼3.65
Posts /wp-admin/edit.php2,696 ▲83.24 ▲0.0062.23 ▼0.37137.58 ▼4.95
Add New Post /wp-admin/post-new.php1,710 ▲7118.34 ▲2.87427.25 ▲38.58156.03 ▲0.83
Media Library /wp-admin/upload.php1,703 ▲55.53 ▲0.03143.47 ▲1.62189.63 ▲5.77
Olimometer /wp-admin/options-general.php?page=olimometer_manage2,4752.9167.60181.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/olimometer/olimometer.php+1191
    Function create_function() is deprecated
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_olimometer_olimometers
  • The uninstall procedure has failed, leaving 5 options in the database
    • olimometer_db_version
    • olimometer_updated_to_two
    • olimometer_skins_custom_location
    • olimometer_skins_location
    • widget_olimometerwidget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=olimometer_manage
    • > Deprecated in wp-content/plugins/olimometer/olimometer.php+1191
    Function create_function() is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=olimometer_manage
    • > Deprecated in wp-content/plugins/olimometer/skins.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; Olimometer_Skins has a deprecated constructor

SRP 0% 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 fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/olimometer/thermometer.php
  • 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/olimometer/olimometer.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (The Olimometer in a sidebar widget with default skin), #2 (The Red and Rounded skin in a widget with a header), #3 (The Horizontal Thin and Red skin), #4 (Olimometer settings page)
  • Tags: Please delete some tags, you are using 23 tag instead of maximum 10
The official readme.txt might help

olimometer/olimometer.php Passed 13 tests

Analyzing the main PHP file in "Olimometer" version 2.57
132 characters long description:
A dynamic fundraising thermometer with PayPal integration, customisable height, currency, background colour, transparency and skins.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,763 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP44913831,833
JavaScript213636778
XML100143
HTML1309

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity28.67
▷ Minimum class complexity11.00
▷ Maximum class complexity50.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
35 PNG files occupy 0.15MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jscolor/hs.png2.62KB7.54KB0.00%
skins/oli-watermaster/watermaster-bottom.png3.31KB0.46KB▼ 86.15%
skins/oli-default/therm_bar_empty.png0.72KB0.71KB▼ 1.09%
skins/oli-ourprogress-red/therm_bar_empty.png2.96KB0.37KB▼ 87.64%
jscolor/hv.png2.80KB7.32KB0.00%