68% add-to-post-footer

Code Review | Add To Post Footer

WordPress plugin Add To Post Footer scored68%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: 6.3.1
  • 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,718 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.32MB] [CPU: ▼16.65ms] Passed 4 tests

An overview 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.44 ▼0.0232.03 ▼8.01
Dashboard /wp-admin3.32 ▲0.0244.96 ▼8.36
Posts /wp-admin/edit.php3.37 ▲0.0243.26 ▼2.34
Add New Post /wp-admin/post-new.php4.61 ▼1.2743.23 ▼47.90
Media Library /wp-admin/upload.php3.24 ▲0.0235.88 ▲1.33
Add To Post Footer /wp-admin/edit.php?page=atpf-options3.2130.94

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 6 new options
New tables
wp_atpf_options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Add To Post Footer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.21 ▼1.091.74 ▼0.1241.61 ▼2.33
Dashboard /wp-admin2,209 ▲185.77 ▲0.8897.40 ▼1.4040.26 ▼4.14
Posts /wp-admin/edit.php2,095 ▲62.03 ▲0.0534.78 ▼3.5735.17 ▼6.24
Add New Post /wp-admin/post-new.php1,541 ▲823.45 ▲0.18648.73 ▼46.0154.48 ▲4.40
Media Library /wp-admin/upload.php1,394 ▲34.24 ▲0.0895.08 ▼2.2440.20 ▼5.46
Add To Post Footer /wp-admin/edit.php?page=atpf-options1,5246.66136.31124.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_atpf_options
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > 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 | 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
  • 4× PHP files trigger server errors when accessed directly:
    • > 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 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 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_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 is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === add-to-post-footer === )
  • Screenshots: These screenshots have no corresponding images in /assets: #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))
The official readme.txt might help

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

This is the main PHP file of "Add To Post Footer" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 231 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! 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

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.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

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