83% cision-block

Code Review | Cision Block

WordPress plugin Cision Block scored83%from 54 tests.

About plugin

  • Plugin page: cision-block
  • Plugin version: 2.9.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 20, 2017
  • Latest release: Nov 23, 2023
  • Number of updates: 289
  • Update frequency: every 8.0 days
  • Top authors: cyclonecode (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /7,620 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.50MB] [CPU: ▲3.20ms] Passed 4 tests

A check of server-side resources used by Cision Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4749.62 ▲8.32
Dashboard /wp-admin3.85 ▲0.5448.49 ▼2.13
Posts /wp-admin/edit.php3.90 ▲0.5451.08 ▲1.41
Add New Post /wp-admin/post-new.php6.39 ▲0.5092.37 ▲6.86
Media Library /wp-admin/upload.php3.71 ▲0.4840.46 ▲6.65
Cision Block /wp-admin/options-general.php?page=cision-block3.7837.69

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 41 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_cision_block_widget
cision_block_settings
widget_recent-comments

Browser metrics Passed 4 tests

Cision Block: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲3914.27 ▼0.431.69 ▼0.2439.86 ▼4.08
Dashboard /wp-admin2,203 ▲265.64 ▼0.0198.13 ▼0.0841.69 ▼1.43
Posts /wp-admin/edit.php2,111 ▲112.13 ▲0.1644.02 ▲4.7635.18 ▲0.80
Add New Post /wp-admin/post-new.php1,536 ▲1023.08 ▼0.04682.31 ▲49.6564.67 ▲16.16
Media Library /wp-admin/upload.php1,411 ▲114.43 ▲0.2199.38 ▲0.0642.97 ▲0.14
Cision Block /wp-admin/options-general.php?page=cision-block1,8251.7030.7630.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_cision_block_widget

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
Good news, no errors were detected

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
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CisionBlock\\Plugin\\Common\\Singleton' not found in wp-content/plugins/cision-block/src/Backend/Backend.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cision-block/src/Backend/templates/status.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CisionBlock\\Plugin\\Settings\\Settings' not found in wp-content/plugins/cision-block/src/Settings/Settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_page_templates() in wp-content/plugins/cision-block/src/Backend/templates/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cision-block/src/Backend/templates/permalinks.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CisionBlock\\Plugin\\Http\\AbstractRequest' not found in wp-content/plugins/cision-block/src/Plugin/Http/RemoteRequest.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'CisionBlock\\Plugin\\Http\\RequestInterface' not found in wp-content/plugins/cision-block/src/Plugin/Http/AbstractRequest.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cision-block/src/Backend/templates/tabs.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CisionBlock\\Plugin\\Widget\\Widget' not found in wp-content/plugins/cision-block/src/Widget/Widget.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CisionBlock\\Plugin\\Http\\AbstractResponse' not found in wp-content/plugins/cision-block/src/Plugin/Http/Response.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

cision-block/bootstrap.php 85% from 13 tests

"Cision Block" version 2.9.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("cision-block.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected3,510 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP313721,0633,141
JSON200218
CSS201103
JavaScript11148

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity17.24
▷ Minimum class complexity1.00
▷ Maximum class complexity118.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces11
Interfaces2
Traits0
Classes15
▷ Abstract classes426.67%
▷ Concrete classes1173.33%
▷ Final classes00.00%
Methods165
▷ Static methods2716.36%
▷ Public methods14587.88%
▷ Protected methods137.88%
▷ Private methods74.24%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants39
▷ Global constants00.00%
▷ Class constants39100.00%
▷ Public constants39100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
src/Backend/assets/icon-128x128.png10.44KB4.61KB▼ 55.82%