84% amp-sidebar-hamburger-menu

Code Review | AMP Sidebar Hamburger Menu

WordPress plugin AMP Sidebar Hamburger Menu scored84%from 54 tests.

About plugin

  • Plugin page: amp-sidebar-hambu...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Apr 15, 2020
  • Latest release: Nov 22, 2020
  • Number of updates: 53
  • Update frequency: every 4.2 days
  • Top authors: jamesosborne (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /4,833 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by AMP Sidebar Hamburger Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.38 ▼3.50
Dashboard /wp-admin3.36 ▲0.0544.59 ▼1.71
Posts /wp-admin/edit.php3.47 ▲0.1142.60 ▼4.82
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.30 ▲3.59
Media Library /wp-admin/upload.php3.28 ▲0.0536.44 ▲1.18
AMP Sidebar /wp-admin/options-general.php?page=jozz-ampsidebar-settings3.2530.56

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for AMP Sidebar Hamburger Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,003 ▲24614.55 ▲0.1822.51 ▲20.3945.23 ▼3.51
Dashboard /wp-admin2,221 ▲305.01 ▼1.00120.64 ▼0.9943.19 ▼0.88
Posts /wp-admin/edit.php2,115 ▲262.27 ▲0.2339.23 ▲4.4930.18 ▼4.37
Add New Post /wp-admin/post-new.php1,529 ▲117.86 ▼0.50671.94 ▲43.3437.19 ▼18.84
Media Library /wp-admin/upload.php1,406 ▲214.39 ▲0.1996.88 ▼2.3241.81 ▼3.77
AMP Sidebar /wp-admin/options-general.php?page=jozz-ampsidebar-settings1,0612.4047.7332.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/amp-sidebar-hamburger-menu/header-bar.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/amp-sidebar-hamburger-menu/index.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/amp-sidebar-hamburger-menu/amp-wp-sidebar.php:11

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


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: amp-sidebar, hamburger dropdown, navigation menu, amp navigation, amp sidebar...

amp-sidebar-hamburger-menu/amp-wp-sidebar.php 92% from 13 tests

The main file in "AMP Sidebar Hamburger Menu" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("amp-sidebar-hamburger-menu.php" instead of "amp-wp-sidebar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin536 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.00
▷ Minimum class complexity5.00
▷ Maximum class complexity7.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1381.25%
▷ Anonymous functions318.75%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin