82% publitio-offloading

Code Review | Publitio Offloading

WordPress plugin Publitio Offloading scored82%from 54 tests.

About plugin

  • Plugin page: publitio-offloading
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 24, 2019
  • Latest release: Jun 27, 2023
  • Number of updates: 27
  • Update frequency: every 49.7 days
  • Top authors: publitio (100%)

Code review

54 tests

User reviews

33 reviews

Install metrics

400+ active /8,880 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
Installer ran successfully

Server metrics [RAM: ▲0.52MB] [CPU: ▼6.91ms] Passed 4 tests

A check of server-side resources used by Publitio Offloading
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5642.43 ▼2.23
Dashboard /wp-admin3.86 ▲0.5150.60 ▼17.41
Posts /wp-admin/edit.php3.91 ▲0.5555.05 ▲2.21
Add New Post /wp-admin/post-new.php6.37 ▲0.4991.54 ▼7.73
Media Library /wp-admin/upload.php3.78 ▲0.5539.71 ▼0.28

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

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

Browser metrics Passed 4 tests

Publitio Offloading: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6913.29 ▼1.441.65 ▼0.2242.84 ▲3.30
Dashboard /wp-admin2,239 ▲695.82 ▲0.18110.32 ▲9.2489.42 ▲52.35
Posts /wp-admin/edit.php2,118 ▲151.98 ▼0.0436.02 ▼3.4536.27 ▼0.19
Add New Post /wp-admin/post-new.php1,692 ▲14621.03 ▼2.25709.30 ▼7.5890.54 ▲31.44
Media Library /wp-admin/upload.php1,418 ▲184.21 ▲0.06107.21 ▼12.2751.37 ▲1.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 items
  • 145× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/publitio-offloading/vendor/guzzlehttp/psr7/tests/CachingStreamTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/publitio-offloading/vendor/guzzlehttp/psr7/tests/NoSeekStreamTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/publitio-offloading/vendor/guzzlehttp/psr7/tests/RequestTest.php:12
    • > PHP Warning
      fwrite() expects parameter 1 to be resource, string given in wp-content/plugins/publitio-offloading/vendor/guzzlehttp/guzzle/build/Burgomaster.php on line 115
    • > PHP Warning
      Use of undefined constant STDERR - assumed 'STDERR' (this will throw an Error in a future version of PHP) in wp-content/plugins/publitio-offloading/vendor/guzzlehttp/guzzle/build/Burgomaster.php on line 115
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/publitio-offloading/vendor/guzzlehttp/psr7/tests/DroppingStreamTest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/publitio-offloading/vendor/guzzlehttp/psr7/src/Request.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/publitio-offloading/vendor/guzzlehttp/psr7/tests/StreamTest.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/publitio-offloading/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/publitio-offloading/vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php: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 79% from 29 tests

readme.txt 81% from 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
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === publitio-offloading === )
  • Screenshots: These screenshots lack descriptions #2, #3, #4 in publitio-offloading/assets to your readme.txt
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
The official readme.txt might help

publitio-offloading/publitio-offloading.php 77% from 13 tests

The main PHP file in "Publitio Offloading" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Git Repository: There should be no Git repositories present in your plugin
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected32,738 lines of code in 293 files:
LanguageFilesBlank linesComment linesLines of code
PHP1863,3737,30921,477
Markdown211,13103,556
CSS4347841,685
HTML27441521,662
JavaScript141591751,589
reStructuredText88451,0581,116
TeX1010265659
JSON1000592
make5515219
YAML320192
XML30053
Python1182228
Dockerfile18010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity9.76
▷ Minimum class complexity1.00
▷ Maximum class complexity164.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces19
Interfaces15
Traits2
Classes146
▷ Abstract classes10.68%
▷ Concrete classes14599.32%
▷ Final classes128.28%
Methods1,665
▷ Static methods915.47%
▷ Public methods1,50190.15%
▷ Protected methods150.90%
▷ Private methods1498.95%
Functions488
▷ Named functions7314.96%
▷ Anonymous functions41585.04%
Constants63
▷ Global constants812.70%
▷ Class constants5587.30%
▷ Public constants55100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
30 PNG files occupy 2.07MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/publitio/publitio/docs/html/doc.png0.73KB0.53KB▼ 27.48%
vendor/publitio/publitio/docs/html/bdwn.png0.14KB0.12KB▼ 19.05%
vendor/publitio/publitio/docs/html/closed.png0.13KB0.11KB▼ 12.12%
vendor/publitio/publitio/docs/html/search/search_r.png0.60KB0.53KB▼ 10.95%
vendor/publitio/publitio/docs/html/folderopen.png0.58KB0.55KB▼ 6.03%