89% scale-large-image-threshold

Code Review | Scale Large Image Threshold

WordPress plugin Scale Large Image Threshold scored89%from 54 tests.

About plugin

  • Plugin page: scale-large-image...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.4.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2019
  • Latest release: May 29, 2020
  • Number of updates: 6
  • Update frequency: every 35.2 days
  • Top authors: shaharia.azam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,877 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Scale Large Image Threshold
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.70 ▼4.60
Dashboard /wp-admin3.32 ▲0.0256.16 ▲3.94
Posts /wp-admin/edit.php3.38 ▲0.0149.82 ▼0.80
Add New Post /wp-admin/post-new.php5.91 ▲0.0187.07 ▼13.22
Media Library /wp-admin/upload.php3.25 ▲0.0140.35 ▼0.27

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

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

Browser metrics Passed 4 tests

Scale Large Image Threshold: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.27 ▼0.001.66 ▼0.8439.72 ▼5.62
Dashboard /wp-admin2,195 ▲245.57 ▲0.0689.68 ▼4.0238.48 ▼1.65
Posts /wp-admin/edit.php2,103 ▲32.03 ▼0.1135.92 ▼0.3436.91 ▲0.14
Add New Post /wp-admin/post-new.php1,526 ▼223.41 ▲0.51683.32 ▼3.3264.85 ▼7.70
Media Library /wp-admin/upload.php1,403 ▲34.15 ▲0.02101.15 ▼12.2945.10 ▼1.56

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Configuration Page) image missing
You can look at the official readme.txt

scale-large-image-threshold/scale-large-image-threshold.php 85% from 13 tests

The main PHP file in "Scale Large Image Threshold" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Git Repository: Please do not include Git repositories in your plugin
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 193 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin61 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2121161

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin