84% wp-polymer

Code Review | WordPress Polymer Plugin

WordPress plugin WordPress Polymer Plugin scored84%from 54 tests.

About plugin

  • Plugin page: wp-polymer
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2015
  • Latest release: Nov 21, 2015
  • Number of updates: 8
  • Update frequency: every 0.6 days
  • Top authors: blocknot.es (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,889 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.76MB] [CPU: ▲0.49ms] Passed 4 tests

Server-side resources used by WordPress Polymer Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.20 ▲0.7442.57 ▲4.78
Dashboard /wp-admin4.05 ▲0.7546.48 ▼3.03
Posts /wp-admin/edit.php4.16 ▲0.8149.49 ▲3.76
Add New Post /wp-admin/post-new.php6.69 ▲0.8084.81 ▼3.56
Media Library /wp-admin/upload.php3.97 ▲0.7437.89 ▲5.67
WP Polymer /wp-admin/options-general.php?page=wpp_options3.9837.98

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 338 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Polymer Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,094 ▲33318.41 ▲3.8770.37 ▲68.6338.19 ▼10.24
Dashboard /wp-admin2,215 ▲354.96 ▼0.7193.76 ▲5.9839.96 ▼5.72
Posts /wp-admin/edit.php2,117 ▲172.32 ▲0.3538.32 ▲4.3033.74 ▼5.07
Add New Post /wp-admin/post-new.php6,412 ▲4,88326.27 ▲3.16848.21 ▲160.6645.72 ▼31.03
Media Library /wp-admin/upload.php1,417 ▲174.49 ▲0.2896.62 ▼8.8042.64 ▼6.70
WP Polymer /wp-admin/options-general.php?page=wpp_options2,7552.0231.3443.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/wp-polymer/wp-polymer-template.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_polymer\\plugin_dir_path() in wp-content/plugins/wp-polymer/wp-polymer.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_polymer\\plugin_dir_path() in wp-content/plugins/wp-polymer/conf.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_polymer\\plugin_dir_path() in wp-content/plugins/wp-polymer/wp-polymer-admin.php:4

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Add a description for screenshot #2 in wp-polymer/assets to your readme.txt
You can take inspiration from this readme.txt

wp-polymer/wp-polymer.php Passed 13 tests

Analyzing the main PHP file in "WordPress Polymer Plugin" version 2.0.4
37 characters long description:
Add Polymer elements to your website!

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
Everything looks great! No dangerous files found in this plugin30,313 lines of code in 320 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1694,1823,50819,672
PHP69721,9616,554
HTML1163441,0553,364
CSS1461141377
JSON900160
Markdown4840152
YAML10025
Bourne Shell1489

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity71.79
▷ Minimum class complexity1.00
▷ Maximum class complexity553.00
Average method complexity5.45
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods302
▷ Static methods20.66%
▷ Public methods23878.81%
▷ Protected methods6421.19%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants125
▷ Global constants7459.20%
▷ Class constants5140.80%
▷ Public constants51100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
components/webcomponentsjs/tests/HTMLImports/html/imports/google.png13.69KB8.97KB▼ 34.47%
components/webcomponentsjs/tests/HTMLImports/html/redirect/imports/redirect/googley.png13.69KB8.97KB▼ 34.47%
images/ic_on.png0.57KB0.61KB0.00%
images/ic_off.png0.34KB0.09KB▼ 72.05%
components/webcomponentsjs/tests/ShadowCSS/html/assets/google.png13.69KB8.97KB▼ 34.47%