84% upscale

Code Review | Upscale

WordPress plugin Upscale scored84%from 54 tests.

About plugin

  • Plugin page: upscale
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.2-3.8.2
  • WordPress version: 6.3.1
  • First release: Apr 14, 2014
  • Latest release: Apr 14, 2014
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: TJNowell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,117 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Upscale
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.08 ▼6.69
Dashboard /wp-admin3.32 ▲0.0150.52 ▼5.61
Posts /wp-admin/edit.php3.37 ▲0.0154.31 ▼6.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.97 ▼6.12
Media Library /wp-admin/upload.php3.24 ▲0.0137.79 ▼1.88

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Upscale: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.031.67 ▼0.0941.50 ▼3.21
Dashboard /wp-admin2,192 ▲185.62 ▲0.0695.10 ▼10.0243.54 ▼0.62
Posts /wp-admin/edit.php2,100 ▼31.97 ▲0.0040.34 ▼0.2436.60 ▲0.42
Add New Post /wp-admin/post-new.php1,526 ▼223.45 ▲0.36711.26 ▲63.2255.42 ▲0.84
Media Library /wp-admin/upload.php1,397 ▼64.18 ▼0.03102.15 ▼5.0646.73 ▲1.98

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/upscale/plugin.php:82

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: images, upscaling

upscale/plugin.php 92% from 13 tests

The main PHP script in "Upscale" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("upscale.php" instead of "plugin.php")

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 detected63 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1143637
JSON10022
Markdown1304

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin