68% adsimple-vote

Code Review | AdSimple Vote

WordPress plugin AdSimple Vote scored68%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: 6.3.1
  • 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 /692 total downloads

Benchmarks

Plugin footprint 65% 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.08MB] [CPU: ▼2.11ms] Passed 4 tests

Server-side resources used by AdSimple Vote
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.67 ▲3.04
Dashboard /wp-admin3.37 ▲0.0745.54 ▼7.72
Posts /wp-admin/edit.php3.48 ▲0.1348.25 ▲2.36
Add New Post /wp-admin/post-new.php6.03 ▲0.1582.26 ▼6.13
Media Library /wp-admin/upload.php3.29 ▲0.0634.43 ▲4.64
Settings /wp-admin/edit.php?post_type=adsimplevote&page=adsimplevote_settings3.2633.32
All votes /wp-admin/edit.php?post_type=adsimplevote3.3436.76
Add New Vote /wp-admin/post-new.php?post_type=adsimplevote3.5059.53

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

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

Browser metrics Passed 4 tests

A check of browser resources used by AdSimple Vote
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲12213.63 ▼1.051.74 ▲0.0944.21 ▲3.17
Dashboard /wp-admin2,271 ▲835.81 ▼0.09107.30 ▲4.1638.82 ▼4.38
Posts /wp-admin/edit.php2,161 ▲722.04 ▲0.0539.78 ▼0.6334.71 ▼0.12
Add New Post /wp-admin/post-new.php1,545 ▲2617.83 ▼5.29685.57 ▼60.3370.98 ▲16.47
Media Library /wp-admin/upload.php1,457 ▲694.26 ▲0.08104.09 ▼5.9047.39 ▲1.08
Settings /wp-admin/edit.php?post_type=adsimplevote&page=adsimplevote_settings9691.9633.1430.43
All votes /wp-admin/edit.php?post_type=adsimplevote1,1522.2434.9130.57
Add New Vote /wp-admin/post-new.php?post_type=adsimplevote1,7673.7668.8329.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_adsimplevote
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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 just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.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&ver=6.3.1 1:28609 "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=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=adsimplevote
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: wp.template is not a function
    • > 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=6.3.1 1:28721 Uncaught Error: Template not found: #tmpl-adsimplevote-chart-values

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: umfragen, vote, statistik

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

The principal PHP file in "AdSimple Vote" v. 1.0.1 is loaded by WordPress automatically on each request
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 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected4,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

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin