89% aryo-widget-device

Code Review | Pojo Device Widget

WordPress plugin Pojo Device Widget scored89%from 54 tests.

About plugin

  • Plugin page: aryo-widget-device
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Aug 1, 2013
  • Latest release: Jul 23, 2023
  • Number of updates: 38
  • Update frequency: every 95.9 days
  • Top authors: KingYes (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active /32,028 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Pojo Device Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.45 ▼2.32
Dashboard /wp-admin3.33 ▼0.0243.97 ▼20.65
Posts /wp-admin/edit.php3.38 ▲0.0244.86 ▼0.70
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.84 ▼9.97
Media Library /wp-admin/upload.php3.25 ▲0.0233.24 ▼1.33

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Pojo Device Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲3113.23 ▼1.081.56 ▼0.5238.15 ▼5.05
Dashboard /wp-admin2,206 ▲184.85 ▼0.04105.46 ▼5.7039.90 ▼4.22
Posts /wp-admin/edit.php2,092 ▲62.17 ▲0.1638.97 ▲1.8136.19 ▼0.35
Add New Post /wp-admin/post-new.php1,514 ▼817.60 ▼5.48673.53 ▲7.0058.32 ▼4.87
Media Library /wp-admin/upload.php1,382 ▼64.16 ▼0.0294.88 ▼5.5241.47 ▼3.97

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Screenshot #1 (Widget Setting) image not found
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt might help

aryo-widget-device/aryo-widget-device.php Passed 13 tests

This is the main PHP file of "Pojo Device Widget" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
113 characters long description:
Allows to easily control the display of widgets (Visible/Hidden) by the specific device: Desktop, Tablet, Mobile.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin129 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2272168
PO File18835
CSS14526

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.63KB7.80KB▼ 69.56%