84% wolfram-notebook-embedder

Code Review | Wolfram Notebook Embedder

WordPress plugin Wolfram Notebook Embedder scored84%from 54 tests.

About plugin

  • Plugin page: wolfram-notebook-...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: May 12, 2022
  • Latest release: May 31, 2022
  • Number of updates: 14
  • Update frequency: every 1.5 days
  • Top authors: Wolfram Research (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /288 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.49ms] Passed 4 tests

Server-side resources used by Wolfram Notebook Embedder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.93 ▲3.89
Dashboard /wp-admin3.36 ▲0.0647.26 ▲1.39
Posts /wp-admin/edit.php3.48 ▲0.1243.94 ▼6.84
Add New Post /wp-admin/post-new.php5.96 ▲0.0882.54 ▼5.71
Media Library /wp-admin/upload.php3.29 ▲0.0636.47 ▲1.20

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Wolfram Notebook Embedder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.26 ▼1.172.01 ▲0.2843.18 ▼3.06
Dashboard /wp-admin2,210 ▲195.91 ▲0.97111.68 ▲7.0741.03 ▲0.31
Posts /wp-admin/edit.php2,095 ▲62.04 ▲0.0237.03 ▲0.4136.42 ▲0.31
Add New Post /wp-admin/post-new.php6,360 ▲4,83927.58 ▲3.94877.24 ▲173.3240.03 ▼16.51
Media Library /wp-admin/upload.php1,394 ▲64.20 ▼0.0993.71 ▼14.7640.57 ▼5.94

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

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 | 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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wolfram-notebook-embedder/WneQuicktag.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wolfram-notebook-embedder/WneOembed.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wolfram-notebook-embedder/WneBlock.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wolfram-notebook-embedder/WneBlock.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

wolfram-notebook-embedder/WolframNotebookEmbedder.php 92% from 13 tests

"Wolfram Notebook Embedder" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wolfram-notebook-embedder.php" instead of "WolframNotebookEmbedder.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
There were no executable files found in this plugin647 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3452377
PHP565143240
SVG11017
CSS22013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.50
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1470.00%
▷ Protected methods630.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

Often times overlooked, PNG files can occupy unnecessary space in 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
img/tinyMCEbutton.png0.95KB0.51KB▼ 46.00%