10% dpabottomofpostpage

Code Review | dpaBottomofPostPage

WordPress plugin dpaBottomofPostPage scored10%from 54 tests.

About plugin

  • Plugin page: dpabottomofpostpage
  • Plugin version: 1.24 [20200928]...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Aug 2, 2014
  • Latest release: Sep 27, 2020
  • Number of updates: 64
  • Update frequency: every 35.1 days
  • Top authors: peter achutha (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /6,597 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/dpabottomofpostpage/dpabottomofpostpage-functionality.php+80
    fopen(wp-content/uploads/dpabottomofpostpage/linknumber.txt): failed to open stream: No such file or directory

Server metrics [RAM: ▼1.61MB] [CPU: ▼52.94ms] Passed 4 tests

This is a short check of server-side resources used by dpaBottomofPostPage
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.38 ▼1.085.28 ▼31.50
Dashboard /wp-admin2.40 ▼0.946.93 ▼49.05
Posts /wp-admin/edit.php2.40 ▼0.956.47 ▼44.04
Add New Post /wp-admin/post-new.php2.40 ▼3.487.16 ▼87.18
Media Library /wp-admin/upload.php2.40 ▼0.837.28 ▼26.64
dpabottomofpostpageMenu /wp-admin/options-general.php?page=dpabottomofpostpage_Menu2.406.74

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

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

Browser metrics Passed 4 tests

A check of browser resources used by dpaBottomofPostPage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲7013.32 ▼1.301.71 ▲0.0040.14 ▼0.18
Dashboard /wp-admin2,210 ▲224.86 ▲0.00106.36 ▲3.6639.66 ▼5.12
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0340.93 ▼0.2135.88 ▲2.27
Add New Post /wp-admin/post-new.php1,425 ▼10322.34 ▼0.72526.66 ▼181.0541.21 ▼11.35
Media Library /wp-admin/upload.php1,392 ▲44.27 ▲0.0795.68 ▼12.3643.11 ▼2.20
dpabottomofpostpageMenu /wp-admin/options-general.php?page=dpabottomofpostpage_Menu1,4531.7126.1648.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=dpabottomofpostpage_Menu
    • > Warning in wp-content/plugins/dpabottomofpostpage/dpabottomofpostpage-functionality.php+80
    fopen(wp-content/uploads/dpabottomofpostpage/linknumber.txt): failed to open stream: No such file or directory
    • > GET request to /wp-admin/options-general.php?page=dpabottomofpostpage_Menu
    • > Warning in wp-content/plugins/dpabottomofpostpage/dpabottomofpostpage-functionality.php+81
    fwrite() expects parameter 1 to be resource, bool given
    • > GET request to /wp-admin/options-general.php?page=dpabottomofpostpage_Menu
    • > Warning in wp-content/plugins/dpabottomofpostpage/dpabottomofpostpage-functionality.php+82
    fflush() expects parameter 1 to be resource, bool given
    • > GET request to /wp-admin/options-general.php?page=dpabottomofpostpage_Menu
    • > Warning in wp-content/plugins/dpabottomofpostpage/dpabottomofpostpage-functionality.php+83
    fclose() expects parameter 1 to be resource, bool given

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dpabottomofpostpage/dpabottomofpostpage-functionality.php
    • > /wp-content/plugins/dpabottomofpostpage/spmybpz_zbopp_setup_form.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Shows an example settings when you are the dpaBottomofPostPage plugin. This section is to setup how many messages you need in your Posts and in your Pages and whether they are to be displayed. screenshot-1.png), #2 (Shows what dpaBottomofPostPage screen will look like when first install dpaBottomofPostPage as no messages have been created. screenshot-2.png), #3 (Shows example code entered into the different Post Message Areas. Notice the AFFECTS SEO & DOES NOT AFFECT SEO radio buttons. With version 1.02 you now have the ability to display, by checking the checkboxes, individual messages in HOME and/or CATEGORY and/or ARCHIVES pages. screenshot-3.png), #4 (Shows example code entered into the different Page Message Areas. screenshot-4.png), #5 (Shows example of what your Bottom of Post can look like. screenshot-5.png), #6 (Shows example of how to allow post to display message or stop displaying message. screenshot-6.png), #7 (Shows example of how to allow page to display message or stop displaying message. screenshot-7.png), #8 (Shows how to set up to display or not to display the Like buttons. screenshot-8.png)
Please take inspiration from this readme.txt

dpabottomofpostpage/dpabottomofpostpage-functionality.php 77% from 13 tests

The principal PHP file in "dpaBottomofPostPage" v. 1.24 [20200928]... is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 912 characters long)
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "1.24 [20200928]...")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dpabottomofpostpage.php" instead of "dpabottomofpostpage-functionality.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,970 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23063621,970

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
23 PNG files occupy 0.85MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3-800.png56.85KB52.78KB▼ 7.16%
screenshot-7.png28.64KB24.91KB▼ 13.03%
screenshot-1.png38.96KB34.59KB▼ 11.22%
sfc30.png8.25KB4.19KB▼ 49.23%
screenshot-6.png27.47KB23.67KB▼ 13.85%