72% ultrapress

Code Review | Ultrapress

WordPress plugin Ultrapress scored72%from 54 tests.

About plugin

  • Plugin page: ultrapress
  • Plugin version: 0.0.6
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 6.3.1
  • First release: Jul 25, 2020
  • Latest release: Apr 25, 2021
  • Number of updates: 47
  • Update frequency: every 6.5 days
  • Top authors: meedawi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,133 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.90MB] [CPU: ▲10.92ms] Passed 4 tests

An overview of server-side resources used by Ultrapress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.9050.37 ▲12.39
Dashboard /wp-admin4.21 ▲0.9159.37 ▲7.47
Posts /wp-admin/edit.php4.32 ▲0.9753.26 ▲10.49
Add New Post /wp-admin/post-new.php6.79 ▲0.90125.43 ▲32.62
Media Library /wp-admin/upload.php4.13 ▲0.9047.07 ▲13.33
components /wp-admin/admin.php?page=ultrapress/components.php4.1138.39
add new /wp-admin/admin.php?page=ultrapress/add.php4.1139.05
packages /wp-admin/admin.php?page=ultrapress/packages.php4.1338.45
circuits /wp-admin/admin.php?page=ultrapress/circuits.php4.1141.95
Ultrapress /wp-admin/admin.php?page=ultrapress4.1940.73
Dashboard /wp-admin/admin.php?page=ultrapress/dashboard.php4.0737.82

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 112 new files
Database: no new tables, 10 new options
New WordPress options
ultrapress
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
sssss
theysaidso_admin_options
ultrapress_activate_circuits
llllllll

Browser metrics Passed 4 tests

Ultrapress: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.69 ▼0.901.95 ▼0.0942.37 ▼0.61
Dashboard /wp-admin2,242 ▲545.81 ▲0.9399.95 ▼17.2339.89 ▼4.91
Posts /wp-admin/edit.php2,125 ▲362.01 ▲0.0135.54 ▼1.0035.51 ▲1.02
Add New Post /wp-admin/post-new.php1,559 ▲3123.26 ▲0.17653.83 ▲13.6351.75 ▼11.54
Media Library /wp-admin/upload.php1,424 ▲394.19 ▲0.0098.23 ▼1.2943.40 ▼0.97
components /wp-admin/admin.php?page=ultrapress/components.php1,3173.5558.3854.76
add new /wp-admin/admin.php?page=ultrapress/add.php9953.3051.2328.66
packages /wp-admin/admin.php?page=ultrapress/packages.php9302.9940.7629.64
circuits /wp-admin/admin.php?page=ultrapress/circuits.php9583.0843.4032.35
Ultrapress /wp-admin/admin.php?page=ultrapress2,7965.64162.8740.93
Dashboard /wp-admin/admin.php?page=ultrapress/dashboard.php8952.8137.1821.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • db_upgraded
    • can_compress_scripts
    • ultrapress
    • llllllll
    • widget_recent-posts
    • sssss
    • ultrapress_activate_circuits
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=ultrapress/dashboard.php
    • > Warning in wp-content/plugins/ultrapress/admin/class-ultrapress-admin.php+216
    include_once(partials/ultrapress-admin-display-dashboard.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=ultrapress/dashboard.php
    • > Warning in wp-content/plugins/ultrapress/admin/class-ultrapress-admin.php+216
    include_once(): Failed opening 'partials/ultrapress-admin-display-dashboard.php' for inclusion (include_path='.:/usr/share/php')

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultrapress/admin/partials/ultrapress-admin-display-packages-template.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/ultrapress/admin/partials/ultrapress-admin-display-circuits.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/ultrapress/admin/partials/ultrapress-admin-display-components.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/ultrapress/admin/partials/ultrapress-admin-display.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/ultrapress/admin/partials/ultrapress-admin-display-packages.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultrapress/admin/partials/ultrapress-admin-sidebar.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/ultrapress/admin/partials/ultrapress-admin-display-add-new.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultrapress/admin/partials/ultrapress-admin-dialogs.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultrapress/admin/partials/ultrapress-admin-display-add-circuits-comps.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ultrapress/admin/partials/ultrapress-admin-svg.php:29

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=ultrapress/add.php
    • > Network (severe)
    https://ultra-press.com/wp-admin/admin-ajax.php - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in ultrapress/assets to your readme.txt
Please take inspiration from this readme.txt

ultrapress/ultrapress.php Passed 13 tests

The main file in "Ultrapress" v. 0.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
60 characters long description:
Build and connect features and plugins with visual scripting

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
Good job! No executable or dangerous file extensions detected8,669 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP411,2464,5585,803
JavaScript42681161,663
CSS347601,202
JSON1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity18.62
▷ Minimum class complexity2.00
▷ Maximum class complexity106.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods249
▷ Static methods7228.92%
▷ Public methods22590.36%
▷ Protected methods00.00%
▷ Private methods249.64%
Functions16
▷ Named functions318.75%
▷ Anonymous functions1381.25%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
49 PNG files occupy 0.84MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
components/ultra-node/img/Number-1-icon.png23.65KB10.03KB▼ 57.61%
components/ultra-update-option/img/Button-Delete-icon.png25.98KB11.58KB▼ 55.44%
components/ultra-notify-admin-by-email/img/success-icon.png8.36KB4.66KB▼ 44.30%
components/ultra-add-page/img/add_page.png17.51KB7.08KB▼ 59.56%
templates/component/img/fail-icon.png25.98KB11.58KB▼ 55.44%