73% ultimeter

Code Review | Ultimeter

WordPress plugin Ultimeter scored73%from 54 tests.

About plugin

  • Plugin page: ultimeter
  • Plugin version: 3.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 6, 2018
  • Latest release: Nov 11, 2023
  • Number of updates: 74
  • Update frequency: every 28.1 days
  • Top authors: bouncingsprout (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

1,000+ active /25,672 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲5.50MB] [CPU: ▲53.30ms] 75% from 4 tests

This is a short check of server-side resources used by Ultimeter
It is recommended to improve the following
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.50MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.92 ▲5.46110.20 ▲70.01
Dashboard /wp-admin8.94 ▲5.64110.10 ▲60.53
Posts /wp-admin/edit.php8.94 ▲5.5988.22 ▲45.40
Add New Post /wp-admin/post-new.php11.22 ▲5.34143.97 ▲52.95
Media Library /wp-admin/upload.php8.94 ▲5.7190.62 ▲54.30
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius8.9478.97

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 448 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
fs_debug_mode
fs_accounts
widget_recent-posts
fs_active_plugins
widget_ultimeter_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultimeter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,149 ▲38720.50 ▲6.065.72 ▲3.9331.58 ▼12.48
Dashboard /wp-admin2,471 ▲29010.59 ▲4.96230.14 ▲111.8541.48 ▼5.92
Posts /wp-admin/edit.php2,262 ▲1629.53 ▲7.5894.95 ▲59.2139.76 ▲6.43
Add New Post /wp-admin/post-new.php1,683 ▲15722.20 ▼1.10517.35 ▼155.0937.27 ▼20.04
Media Library /wp-admin/upload.php1,631 ▲23112.30 ▲8.12139.10 ▲41.0546.40 ▲2.24
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1849.1687.2728.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/ultimeter/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • fs_accounts
    • widget_theysaidso_widget
    • fs_debug_mode
    • can_compress_scripts
    • widget_recent-posts
    • widget_ultimeter_widget
    • fs_active_plugins
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_ssl() in wp-content/plugins/ultimeter/admin/partials/enterprise.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ultimeter/admin/class-ultimeter-admin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function upgm_fs() in wp-content/plugins/ultimeter/admin/partials/ultimeter-upgrade-metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/ultimeter/admin/partials/blank-slate.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ultimeter/includes/class-ultimeter-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ultimeter/integrations/woocommerce/includes/class-ultimeter-woocommerce.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimeter/gutenberg/class-ultimeter-gutenberg-block.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/ultimeter/includes/class-ultimeter-rest-controller.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

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
5 plugin tags: progress, goal, meter, fundraising, progress bar

ultimeter/ultimeter.php 92% from 13 tests

This is the main PHP file of "Ultimeter" version 3.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.0.0")

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected90,730 lines of code in 330 files:
LanguageFilesBlank linesComment linesLines of code
PHP23612,19519,95552,009
CSS239291,04812,904
JavaScript139691,3478,338
Sass191,5431528,061
PO File203,1983,5916,500
JSON12002,742
Markdown2390110
SVG40150
XML13016

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity49.30
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.86
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes131
▷ Abstract classes43.05%
▷ Concrete classes12796.95%
▷ Final classes00.00%
Methods1,682
▷ Static methods26315.64%
▷ Public methods1,27775.92%
▷ Protected methods181.07%
▷ Private methods38723.01%
Functions138
▷ Named functions13698.55%
▷ Anonymous functions21.45%
Constants151
▷ Global constants10468.87%
▷ Class constants4731.13%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
27 PNG files occupy 0.50MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/barbasic.png4.98KB2.55KB▼ 48.84%
admin/assets/images/thermometer2020.png6.03KB3.17KB▼ 47.47%
integrations/woocommerce/assets/images/woo.png4.28KB2.51KB▼ 41.37%
admin/assets/images/inf-flip.png5.05KB2.66KB▼ 47.28%
admin/assets/images/ultimeter.png5.80KB2.88KB▼ 50.42%