84% jnext-remove-attachments

Code Review | jnext Remove Attachments

WordPress plugin jnext Remove Attachments scored84%from 54 tests.

About plugin

  • Plugin page: jnext-remove-atta...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.1
  • WordPress version: 6.3.1
  • First release: Aug 20, 2021
  • Latest release: Dec 5, 2022
  • Number of updates: 5
  • Update frequency: every 94.4 days
  • Top authors: jnext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,987 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.27ms] Passed 4 tests

Server-side resources used by jnext Remove Attachments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.52 ▼0.83
Dashboard /wp-admin3.35 ▲0.0545.55 ▼3.14
Posts /wp-admin/edit.php3.40 ▲0.0549.45 ▲1.54
Add New Post /wp-admin/post-new.php5.93 ▲0.0586.98 ▼14.63
Media Library /wp-admin/upload.php3.28 ▲0.0539.40 ▲6.33

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

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

Browser metrics Passed 4 tests

Checking browser requirements for jnext Remove Attachments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.21 ▼1.182.04 ▲0.0641.00 ▼10.06
Dashboard /wp-admin2,206 ▲214.87 ▼1.21107.05 ▲3.5540.46 ▼4.51
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0239.39 ▼1.9633.82 ▼5.20
Add New Post /wp-admin/post-new.php1,533 ▲1923.67 ▲5.92655.43 ▲15.9155.23 ▼4.22
Media Library /wp-admin/upload.php1,388 ▲34.16 ▲0.0194.76 ▼6.0142.29 ▼2.83

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/jnext-remove-attachments/jnext-remove-attachments.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

jnext-remove-attachments/jnext-remove-attachments.php Passed 13 tests

The primary PHP file in "jnext Remove Attachments" version 1.1.0 is used by WordPress to initiate all plugin functionality
121 characters long description:
Delete attached media to all posts or single post (if activated). Remove images assigned to a post to clear old archives.

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
Everything looks great! No dangerous files found in this plugin242 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP212579242

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions12
▷ Named functions12100.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
No PNG images were found in this plugin