84% simple-page-to-sidebar

Code Review | Simple Page to Sidebar

WordPress plugin Simple Page to Sidebar scored84%from 54 tests.

About plugin

  • Plugin page: simple-page-to-si...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2012
  • Latest release: Sep 24, 2012
  • Number of updates: 3
  • Update frequency: every 6.3 days
  • Top authors: stiwahn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /4,993 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.72ms] Passed 4 tests

Server-side resources used by Simple Page to Sidebar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.42 ▼5.45
Dashboard /wp-admin3.33 ▼0.0249.77 ▼16.26
Posts /wp-admin/edit.php3.38 ▲0.0252.04 ▲2.36
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.23 ▲1.87
Media Library /wp-admin/upload.php3.25 ▲0.0237.23 ▲0.97

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_simple_page_to_sidebar
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Simple Page to Sidebar: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.28 ▼0.001.56 ▼0.2043.49 ▼0.39
Dashboard /wp-admin2,189 ▲125.54 ▼0.0884.35 ▼21.4139.51 ▼5.02
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0139.75 ▲1.9735.39 ▼0.86
Add New Post /wp-admin/post-new.php1,526 ▼223.54 ▲0.34660.53 ▼30.7955.21 ▼2.77
Media Library /wp-admin/upload.php1,400 ▲64.17 ▲0.0097.91 ▲0.2947.97 ▲0.74

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_simple_page_to_sidebar
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-page-to-sidebar/simple-page-to-sidebar.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Screenshot 'Widget' section - Adding a page to your sidebar) image required
You can look at the official readme.txt

simple-page-to-sidebar/simple-page-to-sidebar.php Passed 13 tests

The main file in "Simple Page to Sidebar" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
46 characters long description:
Lets you simply add page content to a sidebar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected116 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1317491
PO File16825

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png19.05KB5.91KB▼ 68.97%