10% 1-source-cleaner

Code Review | 1 Source Cleaner

WordPress plugin 1 Source Cleaner scored 10% from 54 tests.

About plugin

  • Plugin page: 1-source-cleaner
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3
  • WordPress version: 6.3.1
  • First release: Jan 17, 2012
  • Latest release: Jan 19, 2012
  • Number of updates: 16
  • Update frequency: every 0.2 days
  • Top authors: elevengraffit@gmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,714 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/1-source-cleaner/1-source-cleaner.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; source_cleaner has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.08ms] Passed 4 tests

Server-side resources used by 1 Source Cleaner
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.59 ▼41.44
Dashboard /wp-admin2.08 ▼1.235.86 ▼44.02
Posts /wp-admin/edit.php2.08 ▼1.284.93 ▼41.72
Add New Post /wp-admin/post-new.php2.08 ▼3.815.92 ▼89.15
Media Library /wp-admin/upload.php2.08 ▼1.155.40 ▼28.42

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for 1 Source Cleaner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,725 ▼1013.21 ▼1.171.56 ▼0.2938.81 ▼8.09
Dashboard /wp-admin2,206 ▲185.06 ▼0.82105.52 ▼11.2039.81 ▼6.47
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0641.16 ▲4.2435.22 ▲2.71
Add New Post /wp-admin/post-new.php1,526 ▲1223.31 ▲5.75656.81 ▼28.3277.41 ▲22.16
Media Library /wp-admin/upload.php1,382 ▲34.19 ▼0.0296.65 ▼7.2641.63 ▼5.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/1-source-cleaner/1-source-cleaner.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; source_cleaner has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/1-source-cleaner/1-source-cleaner.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/1-source-cleaner/2-source-cleaner-ad.php:4

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (2.)
The official readme.txt is a good inspiration

1-source-cleaner/1-source-cleaner.php 92% from 13 tests

This is the main PHP file of "1 Source Cleaner" version 1.1.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:
  • Description: The description should be shorter than 140 characters (currently 285 characters long)

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
There were no executable files found in this plugin68 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2162568

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
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
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.29MB with 0.19MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png256.55KB103.75KB▼ 59.56%
screenshot-1.png41.96KB12.98KB▼ 69.06%