84% page-sidebar-for-twentyseventeen

Code Review | Page Sidebar for Twenty Seventeen

WordPress plugin Page Sidebar for Twenty Seventeen scored84%from 54 tests.

About plugin

  • Plugin page: page-sidebar-for-...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Sep 2, 2017
  • Latest release: Jan 7, 2022
  • Number of updates: 8
  • Update frequency: every 198.5 days
  • Top authors: intoxstudio (100%)Otto42 (25%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /16,369 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.06MB] [CPU: ▼4.11ms] Passed 4 tests

This is a short check of server-side resources used by Page Sidebar for Twenty Seventeen
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.20 ▼0.93
Dashboard /wp-admin3.41 ▲0.0745.12 ▼14.03
Posts /wp-admin/edit.php3.46 ▲0.1147.91 ▲2.46
Add New Post /wp-admin/post-new.php5.93 ▲0.0588.61 ▼3.95
Media Library /wp-admin/upload.php3.27 ▲0.0539.43 ▲6.82
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.3430.00

Server storage [IO: ▲0.16MB] [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: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Page Sidebar for Twenty Seventeen: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲11013.23 ▼1.072.02 ▲0.0144.06 ▲2.40
Dashboard /wp-admin2,237 ▲495.85 ▼0.0396.73 ▼26.2040.36 ▼2.32
Posts /wp-admin/edit.php2,128 ▲392.10 ▲0.0940.50 ▲3.8041.50 ▲9.83
Add New Post /wp-admin/post-new.php1,564 ▲4718.18 ▲0.63658.19 ▼7.8254.64 ▲2.16
Media Library /wp-admin/upload.php1,427 ▲454.25 ▲0.02104.88 ▲7.8250.29 ▲7.07
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins9592.0627.7527.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/page-sidebar-for-twentyseventeen/templates/page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/page-sidebar-for-twentyseventeen/lib/TGM-Plugin-Activation/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/page-sidebar-for-twentyseventeen/templates/front-page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/page-sidebar-for-twentyseventeen/tgm-plugin-activation.php:9

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 Passed 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
4 plugin tags: twentyseventeen, 2017 sidebar, page sidebar, twentyseventeen sidebar

page-sidebar-for-twentyseventeen/page-sidebar-for-twentyseventeen.php Passed 13 tests

The main PHP file in "Page Sidebar for Twenty Seventeen" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
34 characters long description:
Adds default sidebar to all pages.

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
There were no executable files found in this plugin1,895 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP65021,6781,895

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity48.14
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods101
▷ Static methods54.95%
▷ Public methods7877.23%
▷ Protected methods2322.77%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
There were not PNG files found in your plugin