90% dco-comment-attachment

Code Review | DCO Comment Attachment

WordPress plugin DCO Comment Attachment scored90%from 54 tests.

About plugin

  • Plugin page: dco-comment-attac...
  • Plugin version: 2.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: May 6, 2019
  • Latest release: Oct 3, 2022
  • Number of updates: 35
  • Update frequency: every 35.6 days
  • Top authors: denisco (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

8,000+ active /54,175 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.11MB] [CPU: ▼4.37ms] Passed 4 tests

A check of server-side resources used by DCO Comment Attachment
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.23 ▼0.78
Dashboard /wp-admin3.41 ▲0.1148.20 ▼3.09
Posts /wp-admin/edit.php3.53 ▲0.1749.01 ▼0.70
Add New Post /wp-admin/post-new.php5.99 ▲0.1188.90 ▼12.92
Media Library /wp-admin/upload.php3.33 ▲0.1138.10 ▲4.70
DCO Comment Attachment /wp-admin/options-general.php?page=dco-comment-attachment3.3335.90

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for DCO Comment Attachment
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.82 ▲0.621.79 ▲0.1243.47 ▲0.13
Dashboard /wp-admin2,210 ▲224.89 ▲0.03110.65 ▲4.9440.78 ▼4.51
Posts /wp-admin/edit.php2,093 ▲41.99 ▲0.0042.34 ▲5.6937.85 ▲3.33
Add New Post /wp-admin/post-new.php1,544 ▲823.49 ▲0.26600.15 ▼54.7249.83 ▼24.24
Media Library /wp-admin/upload.php1,395 ▲104.19 ▲0.0097.35 ▲0.9241.52 ▲0.65
DCO Comment Attachment /wp-admin/options-general.php?page=dco-comment-attachment1,5551.7424.8832.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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
5 plugin tags: image, video, comment attachment, attachment, comment

dco-comment-attachment/dco-comment-attachment.php Passed 13 tests

The main file in "DCO Comment Attachment" v. 2.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
56 characters long description:
Allows your visitors to attach files with their comments

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,722 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP72809371,328
JavaScript2478259
CSS2321135

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity46.50
▷ Minimum class complexity25.00
▷ Maximum class complexity75.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods78
▷ Static methods00.00%
▷ Public methods78100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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