84% jasmine-test-runner

Code Review | Jasmine Test Runner

WordPress plugin Jasmine Test Runner scored84%from 54 tests.

About plugin

  • Plugin page: jasmine-test-runner
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Nov 24, 2016
  • Latest release: Dec 8, 2016
  • Number of updates: 8
  • Update frequency: every 1.8 days
  • Top authors: timph (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /650 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.40ms] Passed 4 tests

Server-side resources used by Jasmine Test Runner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.50 ▼5.78
Dashboard /wp-admin3.32 ▲0.0246.43 ▼4.41
Posts /wp-admin/edit.php3.37 ▲0.0248.32 ▲2.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.48 ▼10.53
Media Library /wp-admin/upload.php3.25 ▲0.0237.36 ▼0.88

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Jasmine Test Runner
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▲0.241.70 ▼0.2046.95 ▼0.51
Dashboard /wp-admin2,198 ▲265.65 ▼0.0685.62 ▼20.7540.29 ▲0.58
Posts /wp-admin/edit.php2,097 ▼61.99 ▲0.0234.89 ▲0.1337.48 ▲2.44
Add New Post /wp-admin/post-new.php1,526 ▼923.71 ▲5.68611.36 ▼39.4880.73 ▼12.64
Media Library /wp-admin/upload.php1,394 ▼94.25 ▲0.10103.09 ▼1.9541.49 ▼5.41

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
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/jasmine-test-runner/trunk/class-jasmine-test-runner.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/jasmine-test-runner/class-jasmine-test-runner.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: javascript testing, js unit test, unit tests, jasmine

jasmine-test-runner/jasmine-test-runner.php Passed 13 tests

The main PHP script in "Jasmine Test Runner" version 0.1 is automatically included on every request by WordPress
35 characters long description:
Run your jasmine tests in WordPress

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
Everything looks great! No dangerous files found in this plugin3,725 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript58341863,496
CSS220167
PHP2126162

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods440.00%
▷ Protected methods00.00%
▷ Private methods660.00%
Functions0
▷ Named functions00.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 images were found in this plugin