84% content-attachments

Code Review | Content Attachments

WordPress plugin Content Attachments scored84%from 54 tests.

About plugin

  • Plugin page: content-attachments
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.3.0
  • WordPress version: 6.3.1
  • First release: Apr 24, 2017
  • Latest release: Oct 27, 2019
  • Number of updates: 31
  • Update frequency: every 29.6 days
  • Top authors: themecraft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /919 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.39ms] Passed 4 tests

A check of server-side resources used by Content Attachments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.64 ▼3.92
Dashboard /wp-admin3.33 ▲0.0351.24 ▼13.30
Posts /wp-admin/edit.php3.38 ▲0.0347.13 ▼6.74
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.34 ▼5.60
Media Library /wp-admin/upload.php3.25 ▲0.0341.88 ▲5.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Content Attachments: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.121.79 ▲0.0243.30 ▼0.06
Dashboard /wp-admin2,203 ▲514.86 ▼0.84116.72 ▲3.8940.65 ▲0.54
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0334.91 ▼5.8735.08 ▲1.33
Add New Post /wp-admin/post-new.php1,537 ▼523.07 ▲4.56727.18 ▲94.5657.75 ▲7.16
Media Library /wp-admin/upload.php1,385 ▼64.23 ▼0.02109.39 ▲8.7945.65 ▼0.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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 items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/content-attachments/includes/ContentAttachments.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No tags were detected

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

The entry point to "Content Attachments" version 1.1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")

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
There were no executable files found in this plugin139 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24467119
JSON10020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity5.60
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods240.00%
▷ Public methods480.00%
▷ Protected methods120.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin