79% adsimple-vote

Code Review | AdSimple Vote

WordPress plugin AdSimple Vote scored 79% from 54 tests.

About plugin

  • Plugin page: adsimple-vote
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9.1
  • WordPress version: 5.9.2
  • First release: May 23, 2018
  • Latest release: May 29, 2018
  • Number of updates: 3
  • Update frequency: every 10.0 days
  • Top authors: adsimple (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 505 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 gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▼288.29ms] Passed 4 tests

A check of server-side resources used by AdSimple Vote
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.2754.01 ▲1.82
Dashboard /wp-admin3.64 ▲0.2341.15 ▲6.29
Posts /wp-admin/edit.php3.86 ▲0.2241.80 ▲4.97
Add New Post /wp-admin/post-new.php7.19 ▲0.2297.85 ▼1,154.94
Media Library /wp-admin/upload.php3.52 ▲0.2226.19 ▼5.02
Add New Vote /wp-admin/post-new.php?post_type=adsimplevote3.8242.71
All votes /wp-admin/edit.php?post_type=adsimplevote3.6327.10
Settings /wp-admin/edit.php?post_type=adsimplevote&page=adsimplevote_settings3.5023.89

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 31 new files
Database: 1 new table, no new options
New tables
wp_adsimplevote

Browser metrics Passed 4 tests

AdSimple Vote: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,875 ▲15315.94 ▼0.036.39 ▲0.722.88 ▲0.77
Dashboard /wp-admin2,970 ▲1096.13 ▲0.06120.23 ▼14.41157.69 ▼3.73
Posts /wp-admin/edit.php2,769 ▲753.25 ▲0.0264.50 ▲1.25142.52 ▲3.76
Add New Post /wp-admin/post-new.php1,791 ▲8017.36 ▼3.99423.77 ▼18.92157.92 ▼5.21
Media Library /wp-admin/upload.php1,774 ▲765.50 ▲0.02142.15 ▼6.25192.46 ▼3.55
Add New Vote /wp-admin/post-new.php?post_type=adsimplevote2,3575.69100.18129.19
All votes /wp-admin/edit.php?post_type=adsimplevote1,4503.4965.48116.54
Settings /wp-admin/edit.php?post_type=adsimplevote&page=adsimplevote_settings1,2232.9358.91127.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_adsimplevote

Smoke tests 50% 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 | 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/adsimple-vote/adsimple-vote.php:1047

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/post-new.php?post_type=adsimplevote
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2 1:31592 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'replace')" "TypeError: Cannot read properties of undefined (reading 'replace')\n at Function.template (/wp-includes/js/underscore.min.js?ver=1.13.1:2:14860)\n at /wp-includes/js/wp-util.min.js?ver=5.9.2:2:290\n at h (/wp-content/plugins/adsimple-vote/js/admin.min.js?ver=1.0.1:1:799)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/adsimple-vote/js/admin.min.js?ver=1.0.1:1:901)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=adsimplevote
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2 1:31702 Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=adsimplevote&page=adsimplevote_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: wp.template is not a function" "TypeError: wp.template is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/adsimple-vote/js/admin.min.js?ver=1.0.1:1:209)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=adsimplevote&page=adsimplevote_settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: wp.template is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: statistik, vote, umfragen

adsimple-vote/adsimple-vote.php Passed 13 tests

This is the main PHP file of "AdSimple Vote" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
127 characters long description:
Let the users to vote with just one simple click. Create a question and get deep insights in the process. Listen your audience.

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
Success! There were no dangerous files found in this plugin4,783 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript105181,7452,755
CSS101611011,180
PHP2205403733
PO File14350108
SVG1006
Markdown1101

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity40.00
▷ Minimum class complexity11.00
▷ Maximum class complexity69.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods52
▷ Static methods917.31%
▷ Public methods4994.23%
▷ Protected methods23.85%
▷ Private methods11.92%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected