89% save-single-file

Code Review | Save Single File

WordPress plugin Save Single File scored89%from 54 tests.

About plugin

  • Plugin page: save-single-file
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Dec 24, 2020
  • Latest release: Aug 9, 2023
  • Number of updates: 28
  • Update frequency: every 34.3 days
  • Top authors: giuse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /737 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.01MB] [CPU: ▼4.33ms] Passed 4 tests

Analyzing server-side resources used by Save Single File
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0348.27 ▲5.92
Dashboard /wp-admin3.32 ▼0.0248.99 ▼8.32
Posts /wp-admin/edit.php3.38 ▲0.0250.42 ▼0.40
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.75 ▼11.75
Media Library /wp-admin/upload.php3.25 ▲0.0235.88 ▲3.16

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Save Single File
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲12714.23 ▼0.151.94 ▲0.2443.02 ▲2.56
Dashboard /wp-admin2,224 ▲365.84 ▼0.06105.63 ▲1.4841.77 ▼3.06
Posts /wp-admin/edit.php2,116 ▲272.01 ▼0.0138.86 ▲0.9237.06 ▼0.34
Add New Post /wp-admin/post-new.php1,550 ▲3623.05 ▲5.41666.58 ▼23.9156.92 ▼2.89
Media Library /wp-admin/upload.php1,412 ▲214.30 ▲0.0796.03 ▼5.1042.98 ▼2.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

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 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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 your attention:
  • Donate link: Please fix this invalid URI: "buymeacoffee.com/josem"
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

save-single-file/save-single-file.php 92% from 13 tests

This is the main PHP file of "Save Single File" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected79 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP282379

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.78
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin