78% add-to-post-footer

Code Review | Add To Post Footer

WordPress plugin Add To Post Footer scored 78% from 54 tests.

About plugin

  • Plugin page: add-to-post-footer
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 5.9.2
  • First release: Apr 6, 2016
  • Latest release: Apr 10, 2016
  • Number of updates: 5
  • Update frequency: every 1.8 days
  • Top authors: enriquerene (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,519 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.33MB] [CPU: ▼302.95ms] Passed 4 tests

A check of server-side resources used by Add To Post Footer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▼0.0444.61 ▼7.75
Dashboard /wp-admin3.43 ▲0.0236.71 ▲4.01
Posts /wp-admin/edit.php3.66 ▲0.0236.58 ▲0.33
Add New Post /wp-admin/post-new.php5.66 ▼1.3254.57 ▼1,205.63
Media Library /wp-admin/upload.php3.31 ▲0.0125.07 ▲1.26
Add To Post Footer /wp-admin/edit.php?page=atpf-options3.2922.34

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: 1 new table, no new options
New tables
wp_atpf_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add To Post Footer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,802 ▲6016.11 ▲0.516.43 ▲0.472.34 ▲0.14
Dashboard /wp-admin2,895 ▲446.37 ▼0.04119.43 ▼25.95156.95 ▼18.97
Posts /wp-admin/edit.php2,698 ▲73.43 ▲0.0165.06 ▲0.66149.05 ▲6.18
Add New Post /wp-admin/post-new.php1,665 ▲516.78 ▲0.09376.35 ▼50.32156.52 ▲3.01
Media Library /wp-admin/upload.php1,705 ▲45.74 ▲0.04145.38 ▼1.48190.73 ▲0.33
Add To Post Footer /wp-admin/edit.php?page=atpf-options1,9378.76150.72188.07

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 1 table in the database
    • wp_atpf_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?page=atpf-options
    • > Notice in wp-content/plugins/add-to-post-footer/atpf-functions.php+85
    Undefined offset: 0
    • > GET request to /wp-admin/edit.php?page=atpf-options
    • > Notice in wp-content/plugins/add-to-post-footer/atpf-functions.php+85
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ATPF_PLUGIN_NAME - assumed 'ATPF_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/add-to-post-footer/includes/option-page.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/add-to-post-footer/includes/option-page.php:8
    • > PHP Warning
      Use of undefined constant ATPF_PLUGIN_VERSION - assumed 'ATPF_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/add-to-post-footer/includes/option-page.php on line 7
    • > PHP Warning
      Use of undefined constant ATPF_IMAGES_URL - assumed 'ATPF_IMAGES_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/add-to-post-footer/includes/option-page.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Activate the Add To Post Footer plugin (/assets/plugin_page.jpg)), #2 (New option in Post menu (/assets/atpf_submenu.jpg)), #3 (Add To Post Footer option page, where you choose the content of posts (/assets/atpf_option.jpg)), #4 (Some post in the admin editor (/assets/a_post.jpg)), #5 (How the people see the that post (/assets/the_post.jpg))
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === add-to-post-footer === )
Please take inspiration from this readme.txt

add-to-post-footer/add-to-post-footer.php 92% from 13 tests

The principal PHP file in "Add To Post Footer" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 231 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin258 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP44930129
CSS229094
PO File14435

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.03
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin