78% add-custom-content-after-post

Code Review | Add custom content after post

WordPress plugin Add custom content after post scored 78% from 54 tests.

About plugin

  • Plugin page: add-custom-conten...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.0
  • WordPress version: 6.3.1
  • First release: Jan 7, 2015
  • Latest release: Jan 8, 2015
  • Number of updates: 2
  • Update frequency: every 49.5 days
  • Top authors: fabio-zuanon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,455 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.73ms] Passed 4 tests

This is a short check of server-side resources used by Add custom content after post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.21 ▼5.31
Dashboard /wp-admin3.31 ▲0.0144.78 ▼5.44
Posts /wp-admin/edit.php3.36 ▲0.0049.11 ▲1.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.88 ▼17.53
Media Library /wp-admin/upload.php3.23 ▲0.0037.91 ▲1.66

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Add custom content after post
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.31 ▼1.011.62 ▼0.3042.81 ▼8.86
Dashboard /wp-admin2,204 ▲225.83 ▼0.0299.85 ▼8.4837.27 ▼3.66
Posts /wp-admin/edit.php2,093 ▲72.03 ▲0.0133.64 ▼2.7432.40 ▼1.23
Add New Post /wp-admin/post-new.php1,537 ▲1823.33 ▲0.31673.94 ▲26.9664.27 ▲10.49
Media Library /wp-admin/upload.php1,392 ▲104.23 ▲0.0295.66 ▼4.3541.48 ▼0.85
Add Custom Content After Page and Post /wp-admin/acc_Add_Custom_Content.php260.440.0613.98

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-custom-content-after-post/admin/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-custom-content-after-post/admin/index.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/acc_Add_Custom_Content.php
    • > Network (severe)
    wp-admin/acc_Add_Custom_Content.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: author info, custom content, disclaimer

add-custom-content-after-post/index.php 85% from 13 tests

The main PHP file in "Add custom content after post" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Make the plugin description longer than 10 characters (currently 0 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("add-custom-content-after-post.php" instead of "index.php")

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 plugin34 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24934

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin