71% wp-dev-powers-element-selector-jquery-powers

Code Review | WordPress Dev Powers - Element Selector jQuery Powers Plugin

WordPress plugin WordPress Dev Powers - Element Selector jQuery Powers Plugin scored 71% from 54 tests.

About plugin

  • Plugin page: wp-dev-powers-ele...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: May 21, 2019
  • Latest release: Aug 15, 2019
  • Number of updates: 18
  • Update frequency: every 4.8 days
  • Top authors: wpdevpowers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 391 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: ▲4.08MB] [CPU: ▼274.18ms] Passed 4 tests

Analyzing server-side resources used by WordPress Dev Powers - Element Selector jQuery Powers Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /7.92 ▲4.4174.89 ▲22.87
Dashboard /wp-admin7.94 ▲4.5354.01 ▲21.75
Posts /wp-admin/edit.php7.94 ▲4.2956.59 ▲9.26
Add New Post /wp-admin/post-new.php10.04 ▲3.07110.56 ▼1,146.47
Media Library /wp-admin/upload.php7.94 ▲4.6544.97 ▲18.73
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius7.9441.23

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 1,096 new files
Database: no new tables, 5 new options
New WordPress options
fs_api_cache
fs_debug_mode
fs_active_plugins
fs_accounts
fs_gdpr

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Dev Powers - Element Selector jQuery Powers Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,027 ▲26815.97 ▼0.005.81 ▼0.4217.12 ▲14.42
Dashboard /wp-admin3,153 ▲2926.30 ▲0.20116.64 ▼19.39167.74 ▼1.23
Posts /wp-admin/edit.php2,808 ▲1203.28 ▲0.0463.78 ▼0.76149.10 ▲8.99
Add New Post /wp-admin/post-new.php1,687 ▼8520.03 ▼1.18430.30 ▼18.23167.35 ▲4.96
Media Library /wp-admin/upload.php1,949 ▲2515.63 ▲0.14134.82 ▼11.18204.68 ▲12.47
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius1,5702.7456.74130.15

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 5 options
    • fs_active_plugins
    • fs_debug_mode
    • fs_accounts
    • fs_gdpr
    • fs_api_cache

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-dev-powers-element-selector-jquery-powers/freemius/templates/ajax-loader.php
  • 104× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/wp-dev-powers-element-selector-jquery-powers/acf/advanced-custom-fields/includes/acf-field-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-dev-powers-element-selector-jquery-powers/acf/acf-code-field/acf-code-field.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-dev-powers-element-selector-jquery-powers/acf/advanced-custom-fields/includes/forms/form-attachment.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-dev-powers-element-selector-jquery-powers/acf/advanced-custom-fields/includes/forms/form-taxonomy.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/wp-dev-powers-element-selector-jquery-powers/acf/advanced-custom-fields/includes/acf-value-functions.php:4
    • > PHP Notice
      Undefined variable: rule in wp-content/plugins/wp-dev-powers-element-selector-jquery-powers/acf/advanced-custom-fields/includes/admin/views/html-location-rule.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-dev-powers-element-selector-jquery-powers/acf/advanced-custom-fields/includes/acf-data-functions.php:111
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-dev-powers-element-selector-jquery-powers/acf/advanced-custom-fields/includes/admin/views/html-admin-tools.php:21
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-dev-powers-element-selector-jquery-powers/acf/advanced-custom-fields/includes/admin/views/html-location-rule.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-dev-powers-element-selector-jquery-powers/acf/advanced-custom-fields/includes/admin/admin-field-group.php:34

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Network (severe)
    https://maxcdn.bootstrapcdn.com/font-awesome/5.4.0/css/font-awesome.min.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

wp-dev-powers-element-selector-jquery-powers/index.php 77% from 13 tests

"WordPress Dev Powers - Element Selector jQuery Powers Plugin" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 243 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-dev-powers-element-selector-jquery-powers.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin226,504 lines of code in 971 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32115,08113,39690,617
PO File4126,30640,86155,472
PHP25718,91334,52247,324
HTML1823,7521222,363
CSS1278654195,675
Sass28399772,515
JSON3001,520
Markdown93640804
SVG2191209
Bourne Shell1015

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,609)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity32.21
▷ Minimum class complexity1.00
▷ Maximum class complexity2,609.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes156
▷ Abstract classes21.28%
▷ Concrete classes15498.72%
▷ Final classes00.00%
Methods1,786
▷ Static methods1709.52%
▷ Public methods1,45581.47%
▷ Protected methods150.84%
▷ Private methods31617.69%
Functions512
▷ Named functions512100.00%
▷ Anonymous functions00.00%
Constants129
▷ Global constants10682.17%
▷ Class constants2317.83%
▷ Public constants23100.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
22 PNG files occupy 0.12MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
images/border.png0.07KB0.10KB0.00%
acf/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png3.68KB4.17KB0.00%
images/controls.png1.23KB1.28KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%