78% axp-browser-settings

Code Review | AXP Browser Settings

WordPress plugin AXP Browser Settings scored78%from 54 tests.

About plugin

  • Plugin page: axp-browser-settings
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.7.0
  • WordPress version: 6.3.1
  • First release: Dec 21, 2016
  • Latest release: Dec 21, 2016
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: axpdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /746 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
This plugin's installer ran successfully

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

A check of server-side resources used by AXP Browser Settings
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0426.65 ▼14.37
Dashboard /wp-admin3.36 ▲0.0644.15 ▼4.81
Posts /wp-admin/edit.php3.41 ▲0.0539.21 ▼7.86
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.39 ▼4.50
Media Library /wp-admin/upload.php3.28 ▲0.0533.60 ▲0.05
Browser Settings /wp-admin/options-general.php?page=axp-browser-settings3.2331.20

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for AXP Browser Settings
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5913.31 ▼1.071.57 ▼0.1338.16 ▼7.33
Dashboard /wp-admin2,215 ▲385.70 ▲0.0785.15 ▼4.6237.62 ▼4.46
Posts /wp-admin/edit.php2,125 ▲222.26 ▲0.2634.58 ▼12.4531.03 ▼3.85
Add New Post /wp-admin/post-new.php1,543 ▲1223.34 ▲0.19674.36 ▲5.4938.29 ▼26.56
Media Library /wp-admin/upload.php1,426 ▲264.53 ▲0.32104.89 ▲5.6745.29 ▼3.65
Browser Settings /wp-admin/options-general.php?page=axp-browser-settings1,0212.3747.1936.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=axp-browser-settings
    • > Notice in wp-content/plugins/axp-browser-settings/axp-browser-settings.php+170
    Trying to access array offset on value of type bool

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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/axp-browser-settings/axp-browser-settings.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Topbar example in Android Chrome [developers.google.com](https://developers.google.com/web/fundamentals/design-and-ui/browser-customization/theme-color))
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
Please take inspiration from this readme.txt

axp-browser-settings/axp-browser-settings.php Passed 13 tests

Analyzing the main PHP file in "AXP Browser Settings" version 1.0.0
38 characters long description:
Plug-in for your browser on your phone

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
Good job! No executable or dangerous file extensions detected243 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13021180
PO File1181855
Markdown1105
JavaScript1003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png85.50KB34.87KB▼ 59.21%