73% skyroom-wp

Code Review | Skyroom

WordPress plugin Skyroom scored 73% from 54 tests.

About plugin

  • Plugin page: skyroom-wp
  • Plugin version: 1.6.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 5.9.2
  • First release: Jul 15, 2020
  • Latest release: Jan 27, 2021
  • Number of updates: 16
  • Update frequency: every 12.3 days
  • Top authors: skyroom (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 11,265 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.49MB] [CPU: ▼298.52ms] Passed 4 tests

An overview of server-side resources used by Skyroom
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5058.49 ▲4.51
Dashboard /wp-admin3.91 ▲0.5137.23 ▲3.26
Posts /wp-admin/edit.php4.14 ▲0.5043.54 ▼9.56
Add New Post /wp-admin/post-new.php7.44 ▲0.4796.76 ▼1,192.28
Media Library /wp-admin/upload.php3.86 ▲0.5728.57 ▲5.01

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 231 new files
Database: 1 new table, 1 new option
New tables
wp_skyroom_events
New WordPress options
skyroom_db_version

Browser metrics Passed 4 tests

Skyroom: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,832 ▲7815.92 ▲0.306.14 ▲0.273.06 ▲0.59
Dashboard /wp-admin2,922 ▲616.26 ▼0.02126.28 ▼25.70201.02 ▲32.07
Posts /wp-admin/edit.php2,737 ▲463.27 ▲0.0366.95 ▲1.05143.00 ▼3.82
Add New Post /wp-admin/post-new.php1,702 ▲4116.10 ▼0.47435.59 ▲10.93186.26 ▲25.72
Media Library /wp-admin/upload.php1,746 ▲515.58 ▲0.08147.56 ▲2.50221.53 ▲30.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_skyroom_events
  • Zombie WordPress options detected upon uninstall: 1 option
    • skyroom_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 94× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Ds\\Sequence' not found in wp-content/plugins/skyroom-wp/vendor/php-ds/php-ds/src/Deque.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'DI\\Definition\\Definition' not found in wp-content/plugins/skyroom-wp/vendor/php-di/php-di/src/DI/Definition/ObjectDefinition/MethodInjection.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'DI\\Definition\\Definition' not found in wp-content/plugins/skyroom-wp/vendor/php-di/php-di/src/DI/Definition/StringDefinition.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/skyroom-wp/views/users.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'DI\\Definition\\ArrayDefinition' not found in wp-content/plugins/skyroom-wp/vendor/php-di/php-di/src/DI/Definition/ArrayDefinitionExtension.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/skyroom-wp/vendor/downshiftorg/wp-event-emitter/test/EventEmitterTest.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Ds\\Sequence' not found in wp-content/plugins/skyroom-wp/vendor/php-ds/php-ds/src/Vector.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/skyroom-wp/views/login-form.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Skyroom\\Tables\\WPListTable' not found in wp-content/plugins/skyroom-wp/src/Skyroom/Tables/EventsTable.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/skyroom-wp/views/maintenance.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (محیط افزونه اسکای روم Screenshot-1.PNG), #2 (محیط افزونه اسکای روم Screenshot-2.PNG), #3 (محیط افزونه اسکای روم Screenshot-3.PNG), #4 (محیط افزونه اسکای روم Screenshot-4.PNG)
The official readme.txt is a good inspiration

skyroom-wp/skyroom.php 85% from 13 tests

The principal PHP file in "Skyroom" v. 1.6.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("skyroom-wp.php" instead of "skyroom.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected15,210 lines of code in 213 files:
LanguageFilesBlank linesComment linesLines of code
PHP1742,3366,1728,998
JSON11004,104
Markdown1953601,244
PO File1165180375
JavaScript22110175
CSS33615153
YAML140130
XML23331

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.29
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces42
Interfaces25
Traits5
Classes126
▷ Abstract classes32.38%
▷ Concrete classes12397.62%
▷ Final classes118.94%
Methods844
▷ Static methods141.66%
▷ Public methods70984.00%
▷ Protected methods617.23%
▷ Private methods748.77%
Functions56
▷ Named functions1221.43%
▷ Anonymous functions4478.57%
Constants25
▷ Global constants00.00%
▷ Class constants25100.00%
▷ Public constants25100.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
7 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon-hover.png1.93KB1.34KB▼ 30.43%
vendor/container-interop/container-interop/docs/images/interoperating_containers.png25.13KB12.83KB▼ 48.97%
vendor/container-interop/container-interop/docs/images/priority.png15.87KB8.86KB▼ 44.20%
admin/images/icon.png1.80KB1.34KB▼ 25.45%
vendor/container-interop/container-interop/docs/images/side_by_side_containers.png15.88KB8.43KB▼ 46.90%