78% trepidation-mobile-head

Code Review | Trepidation Advanced Mobile Navbar Plugin

WordPress plugin Trepidation Advanced Mobile Navbar Plugin scored78%from 54 tests.

About plugin

  • Plugin page: trepidation-mobil...
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Apr 22, 2017
  • Latest release: Jul 24, 2020
  • Number of updates: 61
  • Update frequency: every 19.5 days
  • Top authors: colingell (98.36%)Otto42 (3.28%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /2,176 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼11.95ms] Passed 4 tests

This is a short check of server-side resources used by Trepidation Advanced Mobile Navbar Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1839.16 ▼6.41
Dashboard /wp-admin3.45 ▲0.1052.90 ▼14.25
Posts /wp-admin/edit.php3.56 ▲0.2149.88 ▼8.46
Add New Post /wp-admin/post-new.php6.05 ▲0.1690.10 ▼18.68
Media Library /wp-admin/upload.php3.37 ▲0.1435.78 ▼1.21

Server storage [IO: ▲0.07MB] [DB: ▲0.31MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Trepidation Advanced Mobile Navbar Plugin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,008 ▲24713.41 ▼0.998.01 ▲6.5040.02 ▲1.29
Dashboard /wp-admin2,211 ▲315.62 ▲0.0288.87 ▼0.2340.62 ▼2.52
Posts /wp-admin/edit.php2,116 ▲132.01 ▼0.0238.77 ▼2.0835.50 ▼4.32
Add New Post /wp-admin/post-new.php1,540 ▲1223.27 ▲0.44623.42 ▲2.9648.76 ▼1.01
Media Library /wp-admin/upload.php1,416 ▲134.19 ▲0.0197.49 ▼6.2646.62 ▲2.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/trepidation-mobile-head/admin/partials/trepi-mobile-head-admin-display.php
    • > /wp-content/plugins/trepidation-mobile-head/public/partials/trepi-mobile-head-public-display.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trepidation-mobile-head/includes/class-trepi-mobile-head-add-to-head.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trepidation-mobile-head/includes/trepi-mobile-head-customiser-settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_action() in wp-content/plugins/trepidation-mobile-head/includes/class-trepi-mobile-head-after-body.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trepidation-mobile-head/includes/class-trepi-mobile-head-add-to-footer.php:80
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trepidation-mobile-head/public/class-trepi-mobile-head-public.php:125

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt is a good inspiration

trepidation-mobile-head/trepi-mobile-head.php 85% from 13 tests

"Trepidation Advanced Mobile Navbar Plugin" version 1.1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("trepidation-mobile-head.php" instead of "trepi-mobile-head.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected944 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP161,178583862
CSS227974
JavaScript22278

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.18
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected