77% pulsemotiv-integration

Code Review | Pulsemotiv Integration

WordPress plugin Pulsemotiv Integration scored77%from 54 tests.

About plugin

  • Plugin page: pulsemotiv-integr...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 22, 2019
  • Latest release: Apr 23, 2019
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: pulsemotiv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /396 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.23ms] Passed 4 tests

An overview of server-side resources used by Pulsemotiv Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.93 ▲2.57
Dashboard /wp-admin3.32 ▼0.0249.17 ▼8.74
Posts /wp-admin/edit.php3.38 ▲0.0242.39 ▲2.76
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.82 ▼9.50
Media Library /wp-admin/upload.php3.25 ▲0.0237.40 ▲5.31

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Pulsemotiv Integration: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲10614.82 ▲0.411.71 ▲0.1643.71 ▲6.13
Dashboard /wp-admin2,261 ▲734.85 ▼1.0596.77 ▼17.9479.08 ▲32.75
Posts /wp-admin/edit.php2,141 ▲492.03 ▲0.0535.45 ▼0.2332.14 ▼0.80
Add New Post /wp-admin/post-new.php1,560 ▲4617.51 ▼0.26718.91 ▲29.5157.41 ▲0.17
Media Library /wp-admin/upload.php1,434 ▲464.25 ▲0.06103.52 ▲5.8569.74 ▲23.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pulsemotiv-integration/admin/partials/pulsemotiv-pulses.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: body in wp-content/plugins/pulsemotiv-integration/admin/partials/pulsemotiv-pulses.php on line 19
    • > PHP Notice
      Trying to get property 'pulses' of non-object in wp-content/plugins/pulsemotiv-integration/admin/partials/pulsemotiv-pulses.php on line 19
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/pulsemotiv-integration/admin/partials/pulsemotiv-pulses.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/pulsemotiv-integration/admin/partials/pulsemotiv-admin-display.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: ""
  • Requires at least: Version format is invalid
You can look at the official readme.txt

pulsemotiv-integration/pulsemotiv-wp-plugin.php 85% from 13 tests

Analyzing the main PHP file in "Pulsemotiv Integration" version 1.0.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pulsemotiv-integration.php" instead of "pulsemotiv-wp-plugin.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin621 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11129530422
CSS1104110
JavaScript332773
SVG10116

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2987.88%
▷ Protected methods00.00%
▷ Private methods412.12%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon.png1.04KB0.60KB▼ 42.68%