10% oktawave-cloud-storage

Code Review | Oktawave Cloud Storage

WordPress plugin Oktawave Cloud Storage scored 10% from 54 tests.

About plugin

  • Plugin page: oktawave-cloud-st...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Nov 30, 2015
  • Latest release: May 23, 2016
  • Number of updates: 21
  • Update frequency: every 23.4 days
  • Top authors: oktawave (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 714 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'OktawaveOCS' not found

Server metrics [RAM: ▲0.29MB] [CPU: ▼1.89ms] Passed 4 tests

A check of server-side resources used by Oktawave Cloud Storage
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3038.81 ▼3.52
Dashboard /wp-admin3.63 ▲0.3250.33 ▲0.40
Posts /wp-admin/edit.php3.68 ▲0.3248.13 ▲3.09
Add New Post /wp-admin/post-new.php6.14 ▲0.2684.30 ▼5.63
Media Library /wp-admin/upload.php3.49 ▲0.2635.12 ▲1.18
Settings /wp-admin/admin.php?page=oktawave_ocs_settings3.4331.31
Migrate /wp-admin/admin.php?page=oktawave_ocs_migrate3.4331.00

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Oktawave Cloud Storage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.25 ▼1.131.63 ▼0.3640.16 ▼4.82
Dashboard /wp-admin2,241 ▲594.93 ▼0.91104.10 ▼15.0379.36 ▲32.22
Posts /wp-admin/edit.php2,121 ▲321.99 ▼0.0638.32 ▼0.0637.46 ▲0.88
Add New Post /wp-admin/post-new.php1,558 ▲2423.34 ▲0.26709.51 ▲31.2061.28 ▲3.37
Media Library /wp-admin/upload.php1,420 ▲294.20 ▲0.02100.40 ▼2.4593.36 ▲47.31
Settings /wp-admin/admin.php?page=oktawave_ocs_settings8852.0828.0028.81
Migrate /wp-admin/admin.php?page=oktawave_ocs_migrate9002.0123.6731.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'OktawaveOCS' not found
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=oktawave_ocs_migrate
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=oktawave_ocs_migrate
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/oktawave-cloud-storage/vendor/ocs-client/examples/OCSClient-timing.php
  • 30× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      require_once(OKTAWAVEOCS__PLUGIN_DIR/src/Oktawave/OCS/OktawaveOCS.php): failed to open stream: No such file or directory in wp-content/plugins/oktawave-cloud-storage/src/Oktawave/OCS/Migrator/UrlsReplacer.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'OKTAWAVEOCS__PLUGIN_DIR/src/Oktawave/OCS/Observer/AttachmentsObserver.php' (include_path='.:/usr/share/php') in wp-content/plugins/oktawave-cloud-storage/src/Oktawave/OCS/OktawaveOCS.php on line 10
    • > PHP Warning
      require_once(OKTAWAVEOCS__PLUGIN_DIR/src/Oktawave/OCS/Utils/FilesPath.php): failed to open stream: No such file or directory in wp-content/plugins/oktawave-cloud-storage/src/Oktawave/OCS/Observer/AttachmentsObserver.php on line 10
    • > PHP Warning
      Use of undefined constant OKTAWAVEOCS__PLUGIN_DIR - assumed 'OKTAWAVEOCS__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/oktawave-cloud-storage/src/Oktawave/OCS/Migrator/FilesUploader.php on line 10
    • > PHP Warning
      Use of undefined constant OKTAWAVEOCS__PLUGIN_DIR - assumed 'OKTAWAVEOCS__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/oktawave-cloud-storage/src/Oktawave/OCS/Observer/MenuObserver.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'OKTAWAVEOCS__PLUGIN_DIR/src/Oktawave/OCS/Controller/SettingsController.php' (include_path='.:/usr/share/php') in wp-content/plugins/oktawave-cloud-storage/src/Oktawave/OCS/Observer/MenuObserver.php on line 10
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/oktawave-cloud-storage/vendor/ocs-client/examples/OCSClient-timing.php on line 17
    • > PHP Warning
      require_once(OKTAWAVEOCS__PLUGIN_DIR/src/Oktawave/OCS/Utils/FilesPath.php): failed to open stream: No such file or directory in wp-content/plugins/oktawave-cloud-storage/src/Oktawave/OCS/Migrator/FilesUploader.php on line 10
    • > PHP Warning
      require_once(OKTAWAVEOCS__PLUGIN_DIR/src/Oktawave/OCS/OktawaveOCS.php): failed to open stream: No such file or directory in wp-content/plugins/oktawave-cloud-storage/src/Oktawave/OCS/Controller/MigrateController.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'OKTAWAVEOCS__PLUGIN_DIR/src/Oktawave/OCS/OktawaveOCS.php' (include_path='.:/usr/share/php') in wp-content/plugins/oktawave-cloud-storage/src/Oktawave/OCS/Controller/MigrateController.php on line 9

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=oktawave_ocs_migrate
    • > Network (severe)
    wp-content/plugins/oktawave-ocs/images/icon.ico - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=oktawave_ocs_settings
    • > Network (severe)
    wp-content/plugins/oktawave-ocs/images/ocs_sample.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 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
2 plugin tags: oktawave, ocs-client

oktawave-cloud-storage/oktawave-ocs.php 85% from 13 tests

"Oktawave Cloud Storage" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, 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 ("oktawave-cloud-storage.php" instead of "oktawave-ocs.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
These items require your attention
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/oktawave-cloud-storage/src/Oktawave/OCS/Controller/ca-bundle.crt
      • wp-content/plugins/oktawave-cloud-storage/vendor/ocs-client/src/Oktawave/OCS/ca-bundle.crt
1,733 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP214257401,653
Markdown126053
JSON10027

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.21
Average class complexity8.19
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods94
▷ Static methods2122.34%
▷ Public methods8287.23%
▷ Protected methods1212.77%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants425.00%
▷ Class constants1275.00%
▷ Public constants12100.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