84% waj-scripts

Code Review | WAJ Scripts

WordPress plugin WAJ Scripts scored84%from 54 tests.

About plugin

  • Plugin page: waj-scripts
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.2
  • WordPress version: 6.3.1
  • First release: Dec 14, 2018
  • Latest release: May 8, 2019
  • Number of updates: 7
  • Update frequency: every 20.7 days
  • Top authors: waughjai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /640 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
Installer ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼6.16ms] Passed 4 tests

An overview of server-side resources used by WAJ Scripts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3650.00 ▲8.66
Dashboard /wp-admin3.67 ▲0.3749.05 ▼1.84
Posts /wp-admin/edit.php3.72 ▲0.3648.32 ▼4.86
Add New Post /wp-admin/post-new.php6.26 ▲0.3789.55 ▼20.82
Media Library /wp-admin/upload.php3.60 ▲0.3641.83 ▲2.89
Directories /wp-admin/themes.php?page=theme_directories3.7135.37

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WAJ Scripts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.431.71 ▲0.0944.66 ▲0.66
Dashboard /wp-admin2,196 ▲225.52 ▼0.0682.91 ▼14.4740.45 ▼0.01
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0137.19 ▼3.6933.57 ▼0.83
Add New Post /wp-admin/post-new.php1,531 ▲522.96 ▲0.05675.05 ▲17.6257.99 ▲3.02
Media Library /wp-admin/upload.php1,407 ▲44.21 ▼0.01102.72 ▼9.5644.54 ▼3.39
Directories /wp-admin/themes.php?page=theme_directories8092.0024.4729.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • theme_directories_options
    • widget_theysaidso_widget
    • widget_recent-posts

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 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
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-scripts/vendor/waughj/test-hash-item/tests/TestHashItemTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-scripts/vendor/waughj/verified-arguments/tests/VerifiedArgumentsTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WaughJ\\VerifiedArguments\\VerifiedArguments' not found in wp-content/plugins/waj-scripts/vendor/waughj/verified-arguments-same-type/src/VerifiedArgumentsSameType.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/waj-scripts/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-scripts/vendor/waughj/wp-theme-option/tests/WPThemeOptionsPageManagerTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-scripts/vendor/waughj/wp-theme-option/tests/WPThemeOptionsSectionTest.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/waj-scripts/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-scripts/vendor/waughj/verified-arguments-same-type/tests/VerifiedArgumentsSameTypeTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-scripts/vendor/waughj/wp-theme-option/tests/WPThemeOptionsPageTest.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/waj-scripts/vendor/psr/http-message/src/RequestInterface.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: scripts

waj-scripts/waj-scripts.php Passed 13 tests

"WAJ Scripts" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
70 characters long description:
WordPress plugin for easily adding CSS stylesheets & JavaScript files.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected3,726 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
PHP485321,2922,542
JSON1200792
Markdown161870375
XML10012
YAML2205

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.22
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces15
Interfaces7
Traits1
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods289
▷ Static methods3211.07%
▷ Public methods25889.27%
▷ Protected methods10.35%
▷ Private methods3010.38%
Functions42
▷ Named functions2661.90%
▷ Anonymous functions1638.10%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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