84% attachments-plus-plus

Code Review | Attachments++

WordPress plugin Attachments++ scored 84% from 54 tests.

About plugin

  • Plugin page: attachments-plus-...
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.6
  • WordPress version: 6.3.1
  • First release: Sep 3, 2013
  • Latest release: Sep 3, 2013
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: dan.rossiter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

A check of server-side resources used by Attachments++
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.22 ▼4.25
Dashboard /wp-admin3.31 ▲0.0143.64 ▼4.30
Posts /wp-admin/edit.php3.36 ▲0.0150.26 ▲6.63
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.27 ▼44.77
Media Library /wp-admin/upload.php3.24 ▲0.0136.19 ▲2.96

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Attachments++
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.161.63 ▼0.0841.07 ▼7.85
Dashboard /wp-admin2,209 ▲244.83 ▼0.19100.68 ▼9.1638.69 ▼2.29
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0038.34 ▲3.0334.69 ▲3.11
Add New Post /wp-admin/post-new.php1,534 ▲123.09 ▼0.03644.47 ▼21.0962.03 ▲6.91
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0292.24 ▼5.0241.42 ▼3.41

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/attachments-plus-plus/attachments-plus-plus.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: video, google viewer, audio, embed, attachments

attachments-plus-plus/attachments-plus-plus.php 92% from 13 tests

Analyzing the main PHP file in "Attachments++" version 0.6
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected194 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP353164194

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity11.00
▷ Minimum class complexity10.00
▷ Maximum class complexity12.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods743.75%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin