83% mobile-action-bar

Code Review | Mobile Action Bar

WordPress plugin Mobile Action Bar scored83%from 54 tests.

About plugin

  • Plugin page: mobile-action-bar
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: May 15, 2017
  • Latest release: May 15, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: dangngocbinh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /627 total downloads

Benchmarks

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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.30ms] Passed 4 tests

A check of server-side resources used by Mobile Action Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0735.54 ▼7.17
Dashboard /wp-admin3.37 ▲0.0645.59 ▲0.26
Posts /wp-admin/edit.php3.49 ▲0.1343.26 ▼5.65
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.40 ▼16.64
Media Library /wp-admin/upload.php3.30 ▲0.0634.78 ▲1.57
Mobile Action Bar /wp-admin/options-general.php?page=mobile-action-bar3.2836.82

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
mobi_actionbar_global_logo
widget_recent-posts
db_upgraded
theysaidso_admin_options
mobi_actionbar_global_action_link
mobi_actionbar_global_button_text
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mobile Action Bar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲18313.54 ▼0.684.89 ▲3.1342.67 ▼2.72
Dashboard /wp-admin2,219 ▲285.03 ▼0.87105.86 ▲4.3639.60 ▼2.48
Posts /wp-admin/edit.php2,103 ▲112.03 ▲0.0139.98 ▼2.1735.29 ▼0.48
Add New Post /wp-admin/post-new.php1,541 ▲2223.55 ▼0.04595.86 ▼15.8058.79 ▲7.40
Media Library /wp-admin/upload.php1,399 ▲114.22 ▲0.0695.51 ▼1.8643.92 ▲4.44
Mobile Action Bar /wp-admin/options-general.php?page=mobile-action-bar1,0093.0147.2464.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • mobi_actionbar_global_logo
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • mobi_actionbar_global_button_text
    • widget_recent-comments
    • widget_recent-posts
    • mobi_actionbar_global_action_link

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mobile-action-bar/public/partials/mobi-actionbar-public-display.php
    • > /wp-content/plugins/mobile-action-bar/admin/partials/mobi-actionbar-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please describe screenshot #1 in mobile-action-bar/assets to your readme.txt
  • Donate link: Please fix this invalid URI: "dangngocbinh.com"
You can take inspiration from this readme.txt

mobile-action-bar/mobi-actionbar.php 85% from 13 tests

The main PHP script in "Mobile Action Bar" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("mobile-action-bar.php" instead of "mobi-actionbar.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin387 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12155542381
JavaScript24546
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.25
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
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
admin/images/demo-logo.png16.04KB7.86KB▼ 50.98%