84% search-and-menu-popup

Code Review | Search and Menu Popup

WordPress plugin Search and Menu Popup scored84%from 54 tests.

About plugin

  • Plugin page: search-and-menu-p...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 4, 2020
  • Latest release: Jul 4, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: rajdipsinharoy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /464 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.08ms] Passed 4 tests

Server-side resources used by Search and Menu Popup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.53 ▼3.72
Dashboard /wp-admin3.34 ▲0.0351.99 ▼5.29
Posts /wp-admin/edit.php3.39 ▲0.0350.66 ▲2.40
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.52 ▼1.30
Media Library /wp-admin/upload.php3.26 ▲0.0335.06 ▼2.01

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Search and Menu Popup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.30 ▼0.071.97 ▲0.2650.09 ▲8.27
Dashboard /wp-admin2,192 ▲125.58 ▼0.1291.76 ▲1.2437.50 ▼5.25
Posts /wp-admin/edit.php2,100 ▲32.00 ▼0.0339.76 ▲0.8835.31 ▲0.06
Add New Post /wp-admin/post-new.php1,545 ▼923.22 ▲4.57676.40 ▼5.7654.11 ▼10.51
Media Library /wp-admin/upload.php1,391 ▼124.22 ▼0.0298.78 ▼4.3042.04 ▲0.49

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/search-and-menu-popup/search-and-menu-popup.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: popup, modal, search, full screen popup on click, menu...

search-and-menu-popup/search-and-menu-popup.php Passed 13 tests

The main file in "Search and Menu Popup" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
53 characters long description:
Display Search OR Menu Popup by Clicking on a Button.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected81 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5243857
CSS11022
JavaScript20222

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.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%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/menu.png2.77KB0.11KB▼ 96.15%
assets/images/search.png3.45KB1.15KB▼ 66.72%
assets/images/close.png3.91KB0.37KB▼ 90.48%
assets/images/close-black.png4.68KB0.97KB▼ 79.31%