78% grotest

Code Review | Grotest

WordPress plugin Grotest scored78%from 54 tests.

About plugin

  • Plugin page: grotest
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: May 2, 2014
  • Latest release: Sep 8, 2014
  • Number of updates: 11
  • Update frequency: every 11.7 days
  • Top authors: websmee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,030 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Grotest
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.80 ▼0.09
Dashboard /wp-admin3.32 ▲0.0147.71 ▼0.76
Posts /wp-admin/edit.php3.37 ▲0.0145.06 ▼3.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.62 ▼8.84
Media Library /wp-admin/upload.php3.24 ▲0.0138.07 ▲4.16

Server storage [IO: ▲0.27MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 101 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Grotest: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.38 ▲0.112.01 ▲0.3240.75 ▼0.22
Dashboard /wp-admin2,214 ▲435.53 ▼0.0085.61 ▼6.8238.90 ▲1.13
Posts /wp-admin/edit.php2,116 ▲161.98 ▲0.0234.09 ▼6.1031.07 ▼4.54
Add New Post /wp-admin/post-new.php1,538 ▲323.22 ▲4.83657.68 ▲14.4951.56 ▼15.57
Media Library /wp-admin/upload.php1,413 ▲134.20 ▲0.01108.05 ▲7.0947.76 ▲0.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/grotest/views/admin/footer.php
  • 72× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Grotest\\Base\\CacheService' not found in wp-content/plugins/grotest/grotest/service/ParameterService.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'GrotestApp' not found in wp-content/plugins/grotest/views/admin/uninstall.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/grotest/grotest/dependencies.php on line 13
    • > PHP Fatal error
      Uncaught Error: Interface 'Grotest\\Base\\IDb' not found in wp-content/plugins/grotest/grotest/base/Db.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Grotest\\Base\\ILogger' not found in wp-content/plugins/grotest/grotest/common/FileLogger.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Grotest\\Base\\IUser' not found in wp-content/plugins/grotest/components/grotest_user.php:6
    • > PHP Notice
      Undefined variable: test in wp-content/plugins/grotest/views/test/index.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Grotest\\Base\\CacheService' not found in wp-content/plugins/grotest/grotest/service/QuestionService.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GrotestApp' not found in wp-content/plugins/grotest/views/admin/header.php:8
    • > PHP Notice
      Undefined variable: config in wp-content/plugins/grotest/grotest/dependencies.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: questionnaire, test, questions, worksheet, survey

grotest/grotest.php 92% from 13 tests

The principal PHP file in "Grotest" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 181 characters long)

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 plugin5,487 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
PHP888651,6914,340
JavaScript411168623
PO File19191201
SQL1380185
CSS2280138

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.83
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces11
Interfaces8
Traits0
Classes69
▷ Abstract classes811.59%
▷ Concrete classes6188.41%
▷ Final classes00.00%
Methods376
▷ Static methods10527.93%
▷ Public methods26169.41%
▷ Protected methods5614.89%
▷ Private methods5915.69%
Functions37
▷ Named functions718.92%
▷ Anonymous functions3081.08%
Constants107
▷ Global constants00.00%
▷ Class constants107100.00%
▷ Public constants107100.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
There are no PNG files in this plugin