78% polymer-components

Code Review | Polymer for WordPress

WordPress plugin Polymer for WordPress scored 78% from 54 tests.

About plugin

  • Plugin page: polymer-components
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.0
  • WordPress version: 5.8.1
  • First release: Oct 29, 2014
  • Latest release: Nov 19, 2015
  • Number of updates: 46
  • Update frequency: every 8.4 days
  • Top authors: blocknot.es (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 3,630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.74MB] [CPU: ▼138.11ms] Passed 4 tests

This is a short check of server-side resources used by Polymer for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.6946.76 ▲12.30
Dashboard /wp-admin3.81 ▲0.7652.59 ▲6.72
Posts /wp-admin/edit.php3.92 ▲0.8149.98 ▲4.25
Add New Post /wp-admin/post-new.php6.18 ▲0.7597.09 ▼568.16
Media Library /wp-admin/upload.php3.75 ▲0.7538.23 ▲4.77
Blocks /wp-admin/edit.php?post_type=block3.8036.69
Add New /wp-admin/post-new.php?post_type=block3.8046.59
Polymer Components /wp-admin/options-general.php?page=polymer-settings3.7031.78

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 780 new files
Database: no new tables, 1 new option
New WordPress options
widget_polymer_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Polymer for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,932 ▲32622.51 ▲6.9878.00 ▲68.9444.98 ▼5.35
Dashboard /wp-admin3,017 ▲866.68 ▲0.70159.78 ▲12.25109.13 ▼1.32
Posts /wp-admin/edit.php2,786 ▲472.71 ▲0.0085.20 ▼6.0188.46 ▼4.63
Add New Post /wp-admin/post-new.php2,398 ▲72824.61 ▲5.52385.15 ▼23.36134.42 ▲27.84
Media Library /wp-admin/upload.php1,857 ▲505.49 ▲0.45139.01 ▼24.40122.78 ▲14.47
Blocks /wp-admin/edit.php?post_type=block1,4432.9566.3471.74
Add New /wp-admin/post-new.php?post_type=block2,2974.30108.37112.78
Polymer Components /wp-admin/options-general.php?page=polymer-settings1,1402.5954.5980.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 1 option in the database
    • widget_polymer_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=polymer-settings
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=polymer-settings
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/polymer-components/polymer-components.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/polymer-components/polymer-template.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/polymer-components/polymer-block.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: You can look at the official readme.txt

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

This is the main PHP file of "Polymer for WordPress" version 1.4.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
37 characters long description:
Add Polymer elements to your website!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected64,217 lines of code in 707 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript694,12413,36327,846
HTML3416,1495,86926,238
PHP8551003,476
JSON162002,838
CSS424944182,710
Markdown7936401,022
Bourne Shell1161159
YAML23013
make1309
SVG2206

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity39.25
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods258
▷ Static methods20.78%
▷ Public methods19475.19%
▷ Protected methods6424.81%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants55
▷ Global constants47.27%
▷ Class constants5192.73%
▷ Public constants51100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
components/core-iconset/my-icons.png2.59KB1.55KB▼ 40.07%
components/core-list/images/2.png11.45KB9.43KB▼ 17.66%
components/core-component-page/bowager-logo.png5.04KB1.92KB▼ 61.86%
components/core-iconset/my-icons-big.png34.90KB6.30KB▼ 81.95%
components/core-animated-pages/demos/quiz1-intro.png9.82KB2.53KB▼ 74.27%