84% pages-in-widgets

Code Review | Pages In Widgets

WordPress plugin Pages In Widgets scored84%from 54 tests.

About plugin

  • Plugin page: pages-in-widgets
  • Plugin version: 1.9.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3
  • WordPress version: 6.3.1
  • First release: May 13, 2015
  • Latest release: Mar 6, 2020
  • Number of updates: 40
  • Update frequency: every 44.0 days
  • Top authors: Jayden Major (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

6,000+ active /57,870 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.23ms] Passed 4 tests

Analyzing server-side resources used by Pages In Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1136.03 ▼0.88
Dashboard /wp-admin3.42 ▲0.1143.98 ▼1.79
Posts /wp-admin/edit.php3.47 ▲0.1147.40 ▲2.99
Add New Post /wp-admin/post-new.php6.00 ▲0.1179.61 ▼17.42
Media Library /wp-admin/upload.php3.34 ▲0.1134.26 ▼0.84

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_pagesinwidgets_post_section
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_pagesinwidgets_page_section
widget_recent-posts

Browser metrics Passed 4 tests

Pages In Widgets: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.151.62 ▲0.0238.22 ▼0.10
Dashboard /wp-admin2,209 ▲185.88 ▲0.94107.94 ▲9.1238.75 ▼4.70
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0142.14 ▲4.6635.81 ▼2.53
Add New Post /wp-admin/post-new.php1,532 ▲423.17 ▲0.06652.44 ▲1.9152.11 ▼1.97
Media Library /wp-admin/upload.php1,382 ▼64.21 ▼0.1094.10 ▼12.8440.78 ▼5.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_pagesinwidgets_post_section
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_pagesinwidgets_page_section

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
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pages-in-widgets/pagesinwidgets.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: page editor, one page section, page, jayden major, filter page images...

pages-in-widgets/pagesinwidgets.php 92% from 13 tests

"Pages In Widgets" version 1.9.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pages-in-widgets.php" instead of "pagesinwidgets.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
There were no executable files found in this plugin433 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP53443433

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity50.00
▷ Minimum class complexity50.00
▷ Maximum class complexity50.00
Average method complexity13.25
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin