83% azurecurve-mobile-detection

Code Review | azurecurve Mobile Detection

WordPress plugin azurecurve Mobile Detection scored83%from 54 tests.

About plugin

  • Plugin page: azurecurve-mobile...
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 29, 2015
  • Latest release: Dec 6, 2018
  • Number of updates: 15
  • Update frequency: every 87.8 days
  • Top authors: azurecurve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,726 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by azurecurve Mobile Detection
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.71 ▼2.19
Dashboard /wp-admin3.31 ▲0.0151.31 ▼0.69
Posts /wp-admin/edit.php3.37 ▲0.0155.24 ▲5.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.53 ▼11.57
Media Library /wp-admin/upload.php3.24 ▲0.0141.16 ▲2.70
Mobile Detection /wp-admin/admin.php?page=azc-md3.2038.74
Plugins /wp-admin/admin.php?page=azc-plugin-menus3.2036.47

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by azurecurve Mobile Detection
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲10714.42 ▲0.132.11 ▲0.1546.58 ▼2.44
Dashboard /wp-admin2,249 ▲465.82 ▲0.92120.70 ▲0.34101.70 ▲58.16
Posts /wp-admin/edit.php2,130 ▲272.00 ▼0.0440.05 ▲2.2137.80 ▲5.71
Add New Post /wp-admin/post-new.php1,555 ▲123.04 ▲5.01655.06 ▼10.8776.24 ▲6.65
Media Library /wp-admin/upload.php1,422 ▲254.24 ▼0.01114.17 ▼17.4685.50 ▲37.30
Mobile Detection /wp-admin/admin.php?page=azc-md1,0042.0129.2531.35
Plugins /wp-admin/admin.php?page=azc-plugin-menus8612.0126.7930.56

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/azurecurve-mobile-detection/includes/menu.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/azurecurve-mobile-detection/includes/menu.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
The official readme.txt might help

azurecurve-mobile-detection/azurecurve-mobile-detection.php 77% from 13 tests

The primary PHP file in "azurecurve Mobile Detection" version 2.0.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 312 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,132 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32387071,116
CSS10216

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity134.00
▷ Minimum class complexity134.00
▷ Maximum class complexity134.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods36
▷ Static methods925.00%
▷ Public methods3391.67%
▷ Protected methods25.56%
▷ Private methods12.78%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/Favicon-16x16.png0.40KB0.34KB▼ 14.81%