62% simba-plugin-updates-manager

Code Review | Simba Plugin Updates Manager

WordPress plugin Simba Plugin Updates Manager scored62%from 54 tests.

About plugin

  • Plugin page: simba-plugin-upda...
  • Plugin version: 1.11.8
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Mar 11, 2015
  • Latest release: Nov 11, 2023
  • Number of updates: 170
  • Update frequency: every 18.6 days
  • Top authors: DavidAnderson (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60+ active /19,643 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.85ms] Passed 4 tests

An overview of server-side resources used by Simba Plugin Updates Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.14 ▼4.28
Dashboard /wp-admin3.36 ▲0.0547.08 ▲0.43
Posts /wp-admin/edit.php3.47 ▲0.1149.39 ▲0.37
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.83 ▼6.88
Media Library /wp-admin/upload.php3.28 ▲0.0533.21 ▼4.60
Plugins Manager /wp-admin/admin.php?page=updraftmanager3.3233.01
/wp-admin/users.php?page=udmanager_manage_user3.2535.25
Upload Zip /wp-admin/admin.php?page=updraftmanager_upload_zip3.2634.12
Add New /wp-admin/admin.php?page=updraftmanager_add_new3.2632.58
Renewal Reminders /wp-admin/admin.php?page=updraftmanager_renewal_reminders3.3235.33

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 226 new files
Database: 3 new tables, 7 new options
New tables
wp_udmanager_plugins
wp_udmanager_user_entitlements
wp_udmanager_download_history
New WordPress options
updraftmanager_last_version
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Simba Plugin Updates Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6514.07 ▼0.271.65 ▲0.0738.35 ▼4.38
Dashboard /wp-admin2,235 ▲545.61 ▼0.1093.52 ▼12.1942.28 ▲0.43
Posts /wp-admin/edit.php2,137 ▲372.02 ▼0.1139.92 ▼0.9035.71 ▼0.90
Add New Post /wp-admin/post-new.php1,556 ▲3023.11 ▼0.85621.61 ▼92.7455.60 ▲2.32
Media Library /wp-admin/upload.php1,434 ▲314.19 ▼0.0398.67 ▼7.1741.36 ▼4.22
Plugins Manager /wp-admin/admin.php?page=updraftmanager9801.9139.4630.28
/wp-admin/users.php?page=udmanager_manage_user8101.8733.9723.54
Upload Zip /wp-admin/admin.php?page=updraftmanager_upload_zip9452.6047.8538.62
Add New /wp-admin/admin.php?page=updraftmanager_add_new9431.8630.1130.42
Renewal Reminders /wp-admin/admin.php?page=updraftmanager_renewal_reminders1,6796.93136.3064.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_udmanager_user_entitlements
    • wp_udmanager_plugins
    • wp_udmanager_download_history
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • updraftmanager_last_version
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% 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 0% 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
Almost there! Just fix the following items
  • 20× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/simba-plugin-updates-manager/classes/class-updraft-semaphore.php
    • > /wp-content/plugins/simba-plugin-updates-manager/convert-download-numbers.php
    • > /wp-content/plugins/simba-plugin-updates-manager/classes/updraftmanager.php
    • > /wp-content/plugins/simba-plugin-updates-manager/vendor/simbamanager_wp_mail.php
    • > /wp-content/plugins/simba-plugin-updates-manager/classes/updraftmanager-ziprules-table.php
    • > /wp-content/plugins/simba-plugin-updates-manager/convert-plugins.php
    • > /wp-content/plugins/simba-plugin-updates-manager/classes/updraftmanager-semaphore-logger.php
    • > /wp-content/plugins/simba-plugin-updates-manager/vendor/michelf/php-markdown/Readme.php
    • > /wp-content/plugins/simba-plugin-updates-manager/premium/class-plugin.php
    • > /wp-content/plugins/simba-plugin-updates-manager/premium/options.php
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught InvalidArgumentException: Expected: php -f convert.php [input file] in wp-content/plugins/simba-plugin-updates-manager/vendor/soundasleep/html2text/convert.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Base' not found in wp-content/plugins/simba-plugin-updates-manager/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Rijndael' not found in wp-content/plugins/simba-plugin-updates-manager/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php:59
    • > PHP Fatal error
      Uncaught Error: Interface 'Michelf\\MarkdownInterface' not found in wp-content/plugins/simba-plugin-updates-manager/vendor/michelf/php-markdown/Michelf/Markdown.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Base' not found in wp-content/plugins/simba-plugin-updates-manager/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Base' not found in wp-content/plugins/simba-plugin-updates-manager/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php:52
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/simba-plugin-updates-manager/vendor/michelf/php-markdown/test/unit/MarkdownExtraTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Base' not found in wp-content/plugins/simba-plugin-updates-manager/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php:64
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/simba-plugin-updates-manager/vendor/soundasleep/html2text/convert.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Michelf\\Markdown' not found in wp-content/plugins/simba-plugin-updates-manager/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=updraftmanager_renewal_reminders
    • > Network (severe)
    wp-content/uploads/updraftmanager/1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: wordpress updates, renewals, updates server, licensing, licences...

simba-plugin-updates-manager/udmanager.php 92% from 13 tests

"Simba Plugin Updates Manager" version 1.11.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simba-plugin-updates-manager.php" instead of "udmanager.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin35,542 lines of code in 151 files:
LanguageFilesBlank linesComment linesLines of code
PHP695,78215,27029,721
XHTML561,02402,503
CSS256541,245
JavaScript51841191,004
Markdown52120485
JSON520407
YAML35179
HTML4451368
XML21130

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 117)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity113.76
▷ Minimum class complexity1.00
▷ Maximum class complexity644.00
Average method complexity6.64
▷ Minimum method complexity1.00
▷ Maximum method complexity117.00
Code structure
Namespaces12
Interfaces1
Traits0
Classes50
▷ Abstract classes12.00%
▷ Concrete classes4998.00%
▷ Final classes00.00%
Methods1,021
▷ Static methods747.25%
▷ Public methods89087.17%
▷ Protected methods10510.28%
▷ Private methods262.55%
Functions14
▷ Named functions857.14%
▷ Anonymous functions642.86%
Constants200
▷ Global constants3316.50%
▷ Class constants16783.50%
▷ Public constants167100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/shopcart.png15.68KB6.33KB▼ 59.64%
images/yes.png3.44KB1.86KB▼ 45.80%