84% content-attacher

Code Review | Content Attacher

WordPress plugin Content Attacher scored84%from 54 tests.

About plugin

  • Plugin page: content-attacher
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1+
  • WordPress version: 6.3.1
  • First release: Sep 28, 2018
  • Latest release: Nov 11, 2018
  • Number of updates: 30
  • Update frequency: every 1.5 days
  • Top authors: mostafadeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /577 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.16MB] [CPU: ▼17.55ms] Passed 4 tests

Server-side resources used by Content Attacher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0745.16 ▲3.14
Dashboard /wp-admin3.13 ▼0.1729.92 ▼15.12
Posts /wp-admin/edit.php3.27 ▼0.0937.53 ▼8.26
Add New Post /wp-admin/post-new.php5.51 ▼0.3866.02 ▼41.74
Media Library /wp-admin/upload.php3.21 ▼0.0129.35 ▼5.09

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Content Attacher
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲1914.72 ▲0.361.77 ▼0.1842.61 ▼0.49
Dashboard /wp-admin2,211 ▲315.50 ▼0.3691.94 ▲3.3137.04 ▲0.44
Posts /wp-admin/edit.php2,113 ▲132.00 ▲0.0134.60 ▼6.6536.01 ▼2.93
Add New Post /wp-admin/post-new.php1,539 ▲1323.37 ▲0.33667.08 ▲44.0370.92 ▲7.84
Media Library /wp-admin/upload.php1,413 ▲134.15 ▼0.1094.03 ▼5.0944.45 ▲2.87

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

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/content-attacher/content-attacher.php:26

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 on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tested up to: Invalid plugin version format
You can look at the official readme.txt

content-attacher/content-attacher.php Passed 13 tests

The main PHP file in "Content Attacher" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
67 characters long description:
The Content Attacher appends something to Wordpress posts or pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin390 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21338292
JavaScript17367
CSS14031

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.68
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin