84% processingjs-for-wp

Code Review | ProcessingJS for WordPress

WordPress plugin ProcessingJS for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: processingjs-for-wp
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.0
  • WordPress version: 6.3.1
  • First release: Apr 23, 2015
  • Latest release: May 6, 2022
  • Number of updates: 30
  • Update frequency: every 85.7 days
  • Top authors: cageehv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,482 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by ProcessingJS for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.83 ▼0.30
Dashboard /wp-admin3.33 ▼0.0150.77 ▼12.76
Posts /wp-admin/edit.php3.38 ▲0.0245.97 ▲0.45
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.94 ▼1.94
Media Library /wp-admin/upload.php3.26 ▲0.0233.34 ▼4.51
ProcessingJS for WP /wp-admin/options-general.php?page=pjs4wp_instructions3.2229.52

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ProcessingJS for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.37 ▼1.194.78 ▲3.0942.55 ▼0.58
Dashboard /wp-admin2,215 ▲295.85 ▲0.8998.51 ▼12.4638.16 ▼7.00
Posts /wp-admin/edit.php2,095 ▲32.00 ▼0.0337.72 ▲1.6833.05 ▲0.81
Add New Post /wp-admin/post-new.php1,536 ▲2223.40 ▲5.71593.33 ▼56.1652.48 ▼16.29
Media Library /wp-admin/upload.php1,391 ▲64.25 ▲0.0298.54 ▼9.1840.57 ▼1.01
ProcessingJS for WP /wp-admin/options-general.php?page=pjs4wp_instructions9102.0128.0231.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/processingjs-for-wp/processingjs-for-wp.php:125

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
7 plugin tags: pjs4wp, processingjs, jquery, processingorg, processing...

processingjs-for-wp/processingjs-for-wp.php Passed 13 tests

This is the main PHP file of "ProcessingJS for WordPress" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
88 characters long description:
Directly write Processing.js code in your post / page or include an existing .pde sketch

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected593 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript100431
PHP12092128
CSS20134

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin