74% arashtad-toggle

Code Review | Arashtad Toggle Plugin

WordPress plugin Arashtad Toggle Plugin scored74%from 54 tests.

About plugin

  • Plugin page: arashtad-toggle
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.2
  • WordPress version: 6.3.1
  • First release: Sep 27, 2017
  • Latest release: Sep 29, 2017
  • Number of updates: 9
  • Update frequency: every 31.2 days
  • Top authors: arashtad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /787 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.55MB] [CPU: ▼46.89ms] Passed 4 tests

A check of server-side resources used by Arashtad Toggle Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.44 ▼1.029.63 ▼34.09
Dashboard /wp-admin2.46 ▼0.8413.97 ▼40.14
Posts /wp-admin/edit.php2.46 ▼0.9010.83 ▼34.38
Add New Post /wp-admin/post-new.php2.46 ▼3.4311.95 ▼78.96
Media Library /wp-admin/upload.php2.46 ▼0.7712.46 ▼25.56

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_artoggle_widget
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Arashtad Toggle Plugin: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲17113.92 ▼0.454.57 ▲2.4936.71 ▼12.66
Dashboard /wp-admin2,209 ▲215.86 ▼0.03101.79 ▼0.9939.41 ▼2.01
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0436.10 ▼0.5633.62 ▼2.02
Add New Post /wp-admin/post-new.php1,514 ▼017.66 ▲0.06683.40 ▼8.8657.70 ▲3.05
Media Library /wp-admin/upload.php1,391 ▼04.23 ▲0.0796.42 ▼1.6042.18 ▼3.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/arashtad-toggle/arashtad-toggle.php+52
    Undefined variable: text_domain
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_artoggle_widget
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/arashtad-toggle/arashtad-toggle.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Screenshot #2 (Default Style) image required
The official readme.txt is a good inspiration

arashtad-toggle/arashtad-toggle.php Passed 13 tests

The main file in "Arashtad Toggle Plugin" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
63 characters long description:
Responsive toggle widget for WordPress, created by Arashtad.com

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,503 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP116242668
CSS12522513
PO File2125127302
JavaScript141119
HTML1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity86.00
▷ Minimum class complexity86.00
▷ Maximum class complexity86.00
Average method complexity22.25
▷ Minimum method complexity2.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected