84% wp247-generatepress-pre-footer-widgets

Code Review | WP247 GeneratePress Pre-Footer Widgets

WordPress plugin WP247 GeneratePress Pre-Footer Widgets scored84%from 54 tests.

About plugin

  • Plugin page: wp247-generatepre...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.31+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 16, 2017
  • Latest release: Dec 18, 2017
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: wescleveland (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,192 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.36ms] Passed 4 tests

An overview of server-side resources used by WP247 GeneratePress Pre-Footer Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.37 ▼2.81
Dashboard /wp-admin3.37 ▲0.0247.34 ▼16.69
Posts /wp-admin/edit.php3.48 ▲0.1251.51 ▲3.21
Add New Post /wp-admin/post-new.php5.96 ▲0.0888.31 ▼12.47
Media Library /wp-admin/upload.php3.29 ▲0.0637.72 ▲2.53

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

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

Browser metrics Passed 4 tests

WP247 GeneratePress Pre-Footer Widgets: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲10514.35 ▼0.181.81 ▲0.1641.24 ▼0.88
Dashboard /wp-admin2,230 ▲535.59 ▼0.0891.53 ▲4.7346.62 ▲7.39
Posts /wp-admin/edit.php2,144 ▲442.16 ▲0.1742.96 ▲7.0238.85 ▲4.49
Add New Post /wp-admin/post-new.php1,554 ▲2823.19 ▼0.07675.41 ▼7.4459.81 ▼0.22
Media Library /wp-admin/upload.php1,443 ▲434.22 ▲0.01104.44 ▲8.9344.95 ▲0.85

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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
  • 10× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp247-generatepress-pre-footer-widgets/include/gp-premium/defaults.php
    • > /wp-content/plugins/wp247-generatepress-pre-footer-widgets/include/customizer.php
    • > /wp-content/plugins/wp247-generatepress-pre-footer-widgets/wp247-generatepress-pre-footer-widgets.php
    • > /wp-content/plugins/wp247-generatepress-pre-footer-widgets/include/gp-premium/background.php
    • > /wp-content/plugins/wp247-generatepress-pre-footer-widgets/include/widgets.php
    • > /wp-content/plugins/wp247-generatepress-pre-footer-widgets/include/prefooter.php
    • > /wp-content/plugins/wp247-generatepress-pre-footer-widgets/include/gp-premium/typography.php
    • > /wp-content/plugins/wp247-generatepress-pre-footer-widgets/include/gp-premium/colors.php
    • > /wp-content/plugins/wp247-generatepress-pre-footer-widgets/include/wp247xns-client-corequisite-notice/wp247xns-client-corequisite-notice.php
    • > /wp-content/plugins/wp247-generatepress-pre-footer-widgets/include/gp-premium/customizer.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Requires at least: The plugin version is formatted incorrectly
  • Screenshots: Please add an image for screenshot #1 (Sample Pre-Footer Widget Section (with green background))
Please take inspiration from this readme.txt

wp247-generatepress-pre-footer-widgets/wp247-generatepress-pre-footer-widgets.php Passed 13 tests

This is the main PHP file of "WP247 GeneratePress Pre-Footer Widgets" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
49 characters long description:
Add Pre-Footer Widgets to the GeneratePress theme

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,217 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP101712271,076
CSS4366112
JavaScript10629

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods350.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions19
▷ Named functions15.26%
▷ Anonymous functions1894.74%
Constants7
▷ Global constants7100.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
1 PNG file occupies 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/Screenshot-1.png92.46KB28.87KB▼ 68.78%