84% wp-safe-updates

Code Review | WP Safe Updates

WordPress plugin WP Safe Updates scored84%from 54 tests.

About plugin

  • Plugin page: wp-safe-updates
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 8, 2016
  • Latest release: Aug 3, 2017
  • Number of updates: 30
  • Update frequency: every 13.0 days
  • Top authors: Zuige (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60+ active /3,643 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.59ms] Passed 4 tests

This is a short check of server-side resources used by WP Safe Updates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.64 ▼0.64
Dashboard /wp-admin3.33 ▼0.0152.63 ▼13.00
Posts /wp-admin/edit.php3.38 ▲0.0251.11 ▲0.21
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.37 ▼12.93
Media Library /wp-admin/upload.php3.25 ▲0.0239.37 ▲4.76

Server storage [IO: ▲0.69MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Illegal file modification found: 1 file (1.94KB) outside of "wp-content/plugins/wp-safe-updates/" and "wp-content/uploads/"
    • (new file) wp-content/db.php
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Safe Updates
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.14 ▼0.121.72 ▼0.3643.23 ▼4.30
Dashboard /wp-admin2,192 ▲155.61 ▼0.0196.63 ▲2.4944.53 ▼0.33
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0133.68 ▼1.2734.81 ▼6.45
Add New Post /wp-admin/post-new.php1,528 ▲223.24 ▲0.05647.00 ▼22.5449.00 ▼18.16
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.07100.27 ▼5.3345.72 ▼0.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-safe-updates/wp-safe-updates.php on line 41
    • > PHP Fatal error
      Uncaught Error: Class 'wpdb' not found in wp-content/plugins/wp-safe-updates/db.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-safe-updates/wp-safe-updates.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: updates, tested, safe

wp-safe-updates/wp-safe-updates.php Passed 13 tests

The principal PHP file in "WP Safe Updates" v. 1.2.2 is loaded by WordPress automatically on each request
75 characters long description:
Test WordPress plugin updates safely before applying them on the live site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected774 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11178323698
JSON40044
Markdown120032

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity17.71
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods52
▷ Static methods1528.85%
▷ Public methods4994.23%
▷ Protected methods00.00%
▷ Private methods35.77%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.61MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png82.03KB23.83KB▼ 70.95%
assets/icon-128x128.png7.41KB4.78KB▼ 35.46%
assets/banner-1544x500.png112.47KB48.93KB▼ 56.50%
assets/screenshot-3.png213.93KB59.40KB▼ 72.23%
assets/screenshot-2.png146.09KB43.97KB▼ 69.90%