83% per-page-widgets

Code Review | Per Page Widgets

WordPress plugin Per Page Widgets scored83%from 54 tests.

About plugin

  • Plugin page: per-page-widgets
  • Plugin version: 0.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2012
  • Latest release: Jul 2, 2012
  • Number of updates: 17
  • Update frequency: every 1.2 days
  • Top authors: Internet123 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /15,999 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Per Page Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.24 ▼8.02
Dashboard /wp-admin3.31 ▼0.0345.29 ▼12.13
Posts /wp-admin/edit.php3.36 ▲0.0147.19 ▲0.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.85 ▼7.69
Media Library /wp-admin/upload.php3.24 ▲0.0131.19 ▼4.78

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Per Page Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.78 ▲0.551.68 ▼0.1038.79 ▼4.94
Dashboard /wp-admin2,206 ▲184.89 ▼1.01108.10 ▼5.6039.53 ▼7.08
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0139.40 ▼2.3836.47 ▼1.00
Add New Post /wp-admin/post-new.php6,261 ▲4,71926.23 ▲7.86843.05 ▲206.3254.91 ▼22.27
Media Library /wp-admin/upload.php1,385 ▼34.21 ▼0.0899.65 ▲0.5441.19 ▼1.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/per-page-widgets/i123_per_page_widgets.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/per-page-widgets/i123_per_page_widgets.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (The default box added to the edit page for each page or post. By default the setting is "Standard" which means the Per Page Widgets will not affect your current sidebar and widget setup. The plugin also adds a little link to edit widget directly in an overlay.), #2 (When selecting "Special" from the main dropdown, you are given detailed control of each widget area. You may show, hide or set special widgets for any area defined by your theme.), #3 (The widget editor shown in an overlay. With this you will edit the custom widgets using the exact same interface that you are used to.)
Please take inspiration from this readme.txt

per-page-widgets/i123_per_page_widgets.php 85% from 13 tests

The entry point to "Per Page Widgets" version 0.0.7 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 241 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("per-page-widgets.php" instead of "i123_per_page_widgets.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected383 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12345186
CSS11097
JavaScript15354
PO File1152146

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png15.33KB6.89KB▼ 55.05%
screenshot-3.png57.95KB28.78KB▼ 50.33%
screenshot-1.png6.72KB3.84KB▼ 42.92%