84% stagtools

Code Review | StagTools

WordPress plugin StagTools scored84%from 54 tests.

About plugin

  • Plugin page: stagtools
  • Plugin version: 2.3.8
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 27, 2013
  • Latest release: Aug 4, 2023
  • Number of updates: 89
  • Update frequency: every 41.1 days
  • Top authors: mauryaratan (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /116,336 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▲0.64ms] Passed 4 tests

An overview of server-side resources used by StagTools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.04 ▼2.20
Dashboard /wp-admin3.45 ▲0.1551.80 ▲0.27
Posts /wp-admin/edit.php3.57 ▲0.2149.81 ▲1.61
Add New Post /wp-admin/post-new.php6.34 ▲0.45102.52 ▲3.92
Media Library /wp-admin/upload.php3.38 ▲0.1538.44 ▲2.88
StagTools /wp-admin/options-general.php?page=stagtools3.3730.66

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 62 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
widget_stag-twitter
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_stag-instagram
widget_recent-comments
widget_stag-flickr
widget_stag-dribbble
widget_recent-posts
...

Browser metrics Passed 4 tests

Checking browser requirements for StagTools
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10615.96 ▲1.3712.34 ▲10.1948.02 ▲3.69
Dashboard /wp-admin2,210 ▲254.87 ▼0.01100.32 ▼16.6539.28 ▼5.33
Posts /wp-admin/edit.php2,104 ▲152.03 ▲0.0336.44 ▼0.2933.37 ▼1.63
Add New Post /wp-admin/post-new.php1,544 ▲1123.64 ▲0.41648.14 ▼18.9036.01 ▼15.02
Media Library /wp-admin/upload.php1,403 ▲214.25 ▲0.0695.05 ▼2.2742.65 ▲1.55
StagTools /wp-admin/options-general.php?page=stagtools9872.0825.1727.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_stag-instagram
    • widget_stag-twitter
    • widget_stag-flickr
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_stag-dribbble
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following items
  • 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ST_Widget' not found in wp-content/plugins/stagtools/includes/widgets/widget-twitter.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ST_Widget' not found in wp-content/plugins/stagtools/includes/widgets/widget-instagram.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stagtools/includes/settings/settings.php:214
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stagtools/shortcodes/stag-shortcodes.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/stagtools/includes/post-type/testimonials.php:4
    • > PHP Fatal error
      Uncaught Error: Class '_WP_Editors' not found in wp-content/plugins/stagtools/assets/js/plugin-lang.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/stagtools/shortcodes/shortcodes.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/stagtools/includes/post-type/team.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/stagtools/includes/widgets/stagtools-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/stagtools/shortcodes/config.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
Please take inspiration from this readme.txt

stagtools/stagtools.php 92% from 13 tests

The entry point to "StagTools" version 2.3.8 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected40,081 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
YAML10021,783
SVG4019,564
CSS41,602193,903
PHP257821,4733,872
JavaScript9104128490
Sass2604462
Markdown1507

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity19.27
▷ Minimum class complexity2.00
▷ Maximum class complexity62.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes00.00%
Methods137
▷ Static methods2014.60%
▷ Public methods11886.13%
▷ Protected methods1813.14%
▷ Private methods10.73%
Functions61
▷ Named functions6098.36%
▷ Anonymous functions11.64%
Constants15
▷ Global constants320.00%
▷ Class constants1280.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/sprite-popup.png0.78KB1.11KB0.00%