84% pressmodo-onboarding

Code Review | Pressmodo Themes Onboarding

WordPress plugin Pressmodo Themes Onboarding scored84%from 54 tests.

About plugin

  • Plugin page: pressmodo-onboarding
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.6
  • WordPress version: 6.3.1
  • First release: Dec 3, 2020
  • Latest release: May 24, 2021
  • Number of updates: 10
  • Update frequency: every 17.2 days
  • Top authors: alessandro.tesoro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /500 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.88MB] [CPU: ▲1.77ms] Passed 4 tests

A check of server-side resources used by Pressmodo Themes Onboarding
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9248.67 ▲6.27
Dashboard /wp-admin4.22 ▲0.9160.62 ▲8.60
Posts /wp-admin/edit.php4.27 ▲0.9154.86 ▲8.16
Add New Post /wp-admin/post-new.php6.74 ▲0.8588.14 ▼15.96
Media Library /wp-admin/upload.php4.08 ▲0.8545.52 ▲12.27
Get started /wp-admin/themes.php?page=pressmodo-onboarding4.1741.41

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Pressmodo Themes Onboarding
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.70 ▲0.561.72 ▼0.3040.82 ▼4.52
Dashboard /wp-admin2,199 ▲315.57 ▲0.0392.13 ▼18.9740.55 ▼0.49
Posts /wp-admin/edit.php2,104 ▲12.02 ▼0.0137.94 ▲2.4734.90 ▼3.10
Add New Post /wp-admin/post-new.php1,540 ▲1218.01 ▼4.98625.99 ▼43.3375.76 ▲22.43
Media Library /wp-admin/upload.php1,404 ▲74.20 ▼0.1297.25 ▼11.1842.56 ▼8.71
Get started /wp-admin/themes.php?page=pressmodo-onboarding8784.79127.7057.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Almost there! Just fix the following items
  • 94× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Laminas\\Diactoros\\Exception\\ExceptionInterface' not found in wp-content/plugins/pressmodo-onboarding/vendor/laminas/laminas-diactoros/src/Exception/InvalidStreamPointerPositionException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Laminas\\Diactoros\\Response' not found in wp-content/plugins/pressmodo-onboarding/vendor/laminas/laminas-diactoros/src/Response/JsonResponse.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ServerRequestFactoryInterface' not found in wp-content/plugins/pressmodo-onboarding/vendor/laminas/laminas-diactoros/src/ServerRequestFactory.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/pressmodo-onboarding/vendor/laminas/laminas-diactoros/src/CallbackStream.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Upgrader_Skin' not found in wp-content/plugins/pressmodo-onboarding/src/Installers/QuietInstallerSkin.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Pressmodo\\Requirements\\Abstracts\\Checker' not found in wp-content/plugins/pressmodo-onboarding/vendor/pressmodo/wp-requirements/src/Checker/WordPress.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Route\\Http\\Exception' not found in wp-content/plugins/pressmodo-onboarding/vendor/league/route/src/Http/Exception/BadRequestException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Route\\Http\\Exception' not found in wp-content/plugins/pressmodo-onboarding/vendor/league/route/src/Http/Exception/ConflictException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Route\\Http\\Exception\\HttpExceptionInterface' not found in wp-content/plugins/pressmodo-onboarding/vendor/league/route/src/Http/Exception.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Laminas\\Diactoros\\Exception\\ExceptionInterface' not found in wp-content/plugins/pressmodo-onboarding/vendor/laminas/laminas-diactoros/src/Exception/UnwritableStreamException.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: import, themes, pressmodo, demo, onboarding...

pressmodo-onboarding/pressmodo-onboarding.php Passed 13 tests

"Pressmodo Themes Onboarding" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
94 characters long description:
Import Pressmodo official themes demo content, widgets and theme settings with just one click.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected20,451 lines of code in 308 files:
LanguageFilesBlank linesComment linesLines of code
PHP1942,5095,8689,144
Markdown461,78203,935
Sass275392452,319
XML9812,185
JSON2001,160
SVG300687
JavaScript9300123543
YAML104110252
HTML62723162
CSS20364

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity7.19
▷ Minimum class complexity1.00
▷ Maximum class complexity155.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces36
Interfaces34
Traits9
Classes118
▷ Abstract classes54.24%
▷ Concrete classes11395.76%
▷ Final classes76.19%
Methods704
▷ Static methods11015.62%
▷ Public methods57882.10%
▷ Protected methods334.69%
▷ Private methods9313.21%
Functions73
▷ Named functions4358.90%
▷ Anonymous functions3041.10%
Constants36
▷ Global constants513.89%
▷ Class constants3186.11%
▷ Public constants3096.77%

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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendor/league/route/docs/assets/images/code.png48.46KB15.27KB▼ 68.49%