78% dev-studio

Code Review | Dev Studio

WordPress plugin Dev Studio scored78%from 54 tests.

About plugin

  • Plugin page: dev-studio
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0, WP_DEBUG is set to true+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 28, 2018
  • Latest release: Nov 27, 2021
  • Number of updates: 19
  • Update frequency: every 56.1 days
  • Top authors: solidbunch (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active /787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.34MB] [CPU: ▼2.95ms] Passed 4 tests

An overview of server-side resources used by Dev Studio
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3440.66 ▲0.01
Dashboard /wp-admin3.69 ▲0.3947.52 ▼1.57
Posts /wp-admin/edit.php3.74 ▲0.3849.65 ▲2.61
Add New Post /wp-admin/post-new.php6.23 ▲0.3491.30 ▼12.85
Media Library /wp-admin/upload.php3.53 ▲0.3038.21 ▲3.77

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

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

Browser metrics Passed 4 tests

Dev Studio: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,011 ▲27613.31 ▼1.446.31 ▲4.5444.99 ▼1.51
Dashboard /wp-admin2,305 ▲1175.96 ▲1.09111.55 ▼9.0272.54 ▲24.89
Posts /wp-admin/edit.php2,206 ▲1172.10 ▲0.1336.20 ▼2.1540.66 ▲9.10
Add New Post /wp-admin/post-new.php1,639 ▲12521.11 ▲3.34775.39 ▲116.9357.81 ▼0.11
Media Library /wp-admin/upload.php1,493 ▲1024.27 ▲0.08101.09 ▲3.5081.90 ▲38.71

Uninstaller [IO: ▲0.77MB] [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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • dev-studio_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/dev-studio/templates/messages/error-box.php
    • > /wp-content/plugins/dev-studio/templates/data/array.php
    • > /wp-content/plugins/dev-studio/templates/data/table.php
  • 51× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function DevStudio() in wp-content/plugins/dev-studio/templates/bar.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dev-studio/templates/data/array.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'DevStudio\\Core\\Abstracts\\Module' not found in wp-content/plugins/dev-studio/app/Modules/MySQL/MySQL.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'DevStudio\\Core\\Abstracts\\Component' not found in wp-content/plugins/dev-studio/app/Modules/Wordpress/Components/Locale/Locale.php:17
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/dev-studio/templates/data/array.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'DevStudio\\Core\\Abstracts\\Component' not found in wp-content/plugins/dev-studio/app/Modules/Wordpress/Components/Shortcodes/Shortcodes.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'DevStudio\\Core\\Abstracts\\Component' not found in wp-content/plugins/dev-studio/app/Modules/PHP/Components/PHPInfo/PHPInfo.php:18
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/dev-studio/templates/messages/error-box.php on line 4
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/dev-studio/templates/data/table.php on line 100
    • > PHP Fatal error
      Uncaught Error: Class 'DevStudio\\Core\\Abstracts\\Component' not found in wp-content/plugins/dev-studio/app/Modules/MySQL/Components/Overview/Overview.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: queries, developer, dev studio, query monitor, utilities...

dev-studio/dev-studio.php 92% from 13 tests

The main PHP script in "Dev Studio" version 2.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires PHP: Required version number should use periods and dots only (ex. "7.0" instead of "7.0, WP_DEBUG is set to true")

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
There were no executable files found in this plugin7,173 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
PHP691,7102,3057,088
SVG21082
CSS2002
JavaScript1001

PHP code Passed 2 tests

A short 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.49
Average class complexity9.66
▷ Minimum class complexity1.00
▷ Maximum class complexity128.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces29
Interfaces0
Traits0
Classes104
▷ Abstract classes76.73%
▷ Concrete classes9793.27%
▷ Final classes00.00%
Methods363
▷ Static methods6517.91%
▷ Public methods34093.66%
▷ Protected methods123.31%
▷ Private methods113.03%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png2.19KB1.09KB▼ 50.31%