84% awebsome-browser-selector-for-caching

Code Review | Awebsome Browser Selector for CACHING

WordPress plugin Awebsome Browser Selector for CACHING scored84%from 54 tests.

About plugin

  • Plugin page: awebsome-browser-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 11, 2013
  • Latest release: Apr 12, 2013
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: jrevillini (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,774 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.63ms] Passed 4 tests

Server-side resources used by Awebsome Browser Selector for CACHING
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.77 ▼1.19
Dashboard /wp-admin3.32 ▲0.0147.93 ▼3.27
Posts /wp-admin/edit.php3.37 ▲0.0150.29 ▼2.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.33 ▼15.78
Media Library /wp-admin/upload.php3.24 ▲0.0139.00 ▲3.61

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

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

Browser metrics Passed 4 tests

Awebsome Browser Selector for CACHING: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.341.71 ▲0.0043.34 ▼2.02
Dashboard /wp-admin2,206 ▲215.91 ▲0.06112.79 ▲9.6340.57 ▼7.35
Posts /wp-admin/edit.php2,089 ▼02.14 ▲0.1440.29 ▼0.4436.51 ▲0.47
Add New Post /wp-admin/post-new.php1,533 ▲522.97 ▲0.28631.09 ▼0.4058.97 ▲6.43
Media Library /wp-admin/upload.php1,385 ▼64.22 ▲0.03105.66 ▲0.7249.38 ▲4.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/awebsome-browser-selector-for-caching/awebsome-bs-for-caching.php on line 23
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/awebsome-browser-selector-for-caching/awebsome-bs-for-caching.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/awebsome-browser-selector-for-caching/awebsome-bs-for-caching.php:24
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/awebsome-browser-selector-for-caching/awebsome-bs-for-caching.php on line 23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === awebsome-browser-selector-for-caching === )
Please take inspiration from this readme.txt

awebsome-browser-selector-for-caching/awebsome-bs-for-caching.php 92% from 13 tests

The principal PHP file in "Awebsome Browser Selector for CACHING" v. 1.0.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("awebsome-browser-selector-for-caching.php" instead of "awebsome-bs-for-caching.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin62 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1265648
JavaScript11214

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected