84% sky-remove-attached-files-and-featured-images-automatically

Code Review | Sky Remove Attached Files And Featured Images Automatically

WordPress plugin Sky Remove Attached Files And Featured Images Automatically scored84%from 54 tests.

About plugin

  • Plugin page: sky-remove-attach...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4
  • WordPress version: 6.3.1
  • First release: Dec 30, 2015
  • Latest release: Dec 30, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: kent_v (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /895 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.66ms] Passed 4 tests

Server-side resources used by Sky Remove Attached Files And Featured Images Automatically
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.49 ▲2.33
Dashboard /wp-admin3.31 ▲0.0147.19 ▼6.62
Posts /wp-admin/edit.php3.36 ▲0.0046.50 ▼3.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.78 ▼22.10
Media Library /wp-admin/upload.php3.23 ▲0.0037.12 ▲1.80

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Sky Remove Attached Files And Featured Images Automatically
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.28 ▼0.251.97 ▼0.1244.53 ▼0.56
Dashboard /wp-admin2,195 ▲215.54 ▼0.1286.93 ▼23.8239.46 ▼14.65
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0736.45 ▼2.0434.40 ▼4.23
Add New Post /wp-admin/post-new.php1,526 ▼823.74 ▲0.70639.56 ▼73.8850.12 ▼1.87
Media Library /wp-admin/upload.php1,400 ▲34.19 ▲0.0294.21 ▼8.2044.22 ▲0.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sky-remove-attached-files-and-featured-images-automatically/sky-remove-attached-files-and-featured-images-automatically.php:27

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: images, post, auto, delete media, posts...

sky-remove-attached-files-and-featured-images-automatically/sky-remove-attached-files-and-featured-images-automatically.php Passed 13 tests

This is the main PHP file of "Sky Remove Attached Files And Featured Images Automatically" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
105 characters long description:
Automatically eliminate attached media from posts, metabox and featured images uploaded via Media button.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin25 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1252525

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin