84% pym-shortcode

Code Review | Pym.js Embeds

WordPress plugin Pym.js Embeds scored 84% from 54 tests.

About plugin

  • Plugin page: pym-shortcode
  • Plugin version: 1.3.2.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Jun 17, 2016
  • Latest release: Mar 26, 2020
  • Number of updates: 29
  • Update frequency: every 47.5 days
  • Top authors: inn_nerds (65.52%)innlabs (37.93%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,153 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
Installer ran successfully

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

Analyzing server-side resources used by Pym.js Embeds
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.20 ▼5.09
Dashboard /wp-admin3.32 ▲0.0246.36 ▼3.88
Posts /wp-admin/edit.php3.37 ▲0.0247.91 ▼0.16
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.69 ▼2.23
Media Library /wp-admin/upload.php3.24 ▲0.0233.52 ▲0.98
Pym.js Embeds Settings /wp-admin/options-general.php?page=pym-embed-settings3.2131.37
Pym.js Embeds Info /wp-admin/tools.php?page=pym-embeds-info3.2131.89

Server storage [IO: ▲1.07MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Pym.js Embeds
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7314.81 ▲0.221.73 ▼0.2141.01 ▼9.65
Dashboard /wp-admin2,217 ▲295.85 ▼0.0194.07 ▼3.5340.03 ▼2.86
Posts /wp-admin/edit.php2,097 ▲52.02 ▲0.0339.30 ▼1.4233.99 ▼1.03
Add New Post /wp-admin/post-new.php6,589 ▲5,07529.15 ▲11.70910.31 ▲295.9539.80 ▼13.61
Media Library /wp-admin/upload.php1,393 ▲84.19 ▼0.0295.29 ▼3.3641.41 ▼2.86
Pym.js Embeds Settings /wp-admin/options-general.php?page=pym-embed-settings8192.0225.2228.29
Pym.js Embeds Info /wp-admin/tools.php?page=pym-embeds-info7842.0222.5026.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means 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
Please fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function INN\\PymEmbeds\\Settings\\add_action() in wp-content/plugins/pym-shortcode/inc/settings-page.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function INN\\PymEmbeds\\AMP\\add_action() in wp-content/plugins/pym-shortcode/inc/amp.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function INN\\PymEmbeds\\Info\\add_action() in wp-content/plugins/pym-shortcode/inc/info-page.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pym-shortcode/inc/block.php:73
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pym-shortcode/inc/shortcode.php:104

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: responsive, pym, javascript, npr, iframe...

pym-shortcode/pym-shortcode.php 92% from 13 tests

The main file in "Pym.js Embeds" v. 1.3.2.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,266 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP782322482
JavaScript3110346392
Markdown71860367
CSS14525

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.95MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
docs/img/block-in-editor.png619.26KB187.73KB▼ 69.69%
docs/img/responsive-iframe-npr.png70.76KB24.91KB▼ 64.80%
docs/img/pym-example-phone.png74.78KB24.79KB▼ 66.85%
docs/img/pym-example-desktop.png59.87KB21.76KB▼ 63.65%
docs/img/pym-shortcode-in-post.png88.70KB30.24KB▼ 65.90%