84% leadquizzes

Code Review | LeadQuizzes

WordPress plugin LeadQuizzes scored84%from 54 tests.

About plugin

  • Plugin page: leadquizzes
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 24, 2016
  • Latest release: Apr 7, 2017
  • Number of updates: 8
  • Update frequency: every 51.1 days
  • Top authors: yazamodeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,291 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.16ms] Passed 4 tests

This is a short check of server-side resources used by LeadQuizzes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1140.68 ▲1.14
Dashboard /wp-admin3.41 ▲0.0756.03 ▼6.45
Posts /wp-admin/edit.php3.51 ▲0.1648.85 ▲4.47
Add New Post /wp-admin/post-new.php5.99 ▲0.1185.90 ▼15.78
Media Library /wp-admin/upload.php3.34 ▲0.1145.81 ▲9.22
Add New /wp-admin/post-new.php?post_type=leadquiz3.3745.99
LeadQuizzes /wp-admin/edit.php?post_type=leadquiz3.3639.93

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for LeadQuizzes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7614.48 ▲0.131.81 ▲0.1643.73 ▲1.37
Dashboard /wp-admin2,208 ▲285.56 ▼0.1189.98 ▲1.4976.87 ▲36.44
Posts /wp-admin/edit.php2,131 ▲311.98 ▲0.0235.21 ▼4.4930.91 ▼6.27
Add New Post /wp-admin/post-new.php1,705 ▲17422.09 ▼0.89611.07 ▲4.5847.96 ▼8.53
Media Library /wp-admin/upload.php1,425 ▲224.22 ▲0.03100.34 ▼8.6280.51 ▲35.63
Add New /wp-admin/post-new.php?post_type=leadquiz1,4822.4947.4270.42
LeadQuizzes /wp-admin/edit.php?post_type=leadquiz1,0921.9031.6727.78

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_title() in wp-content/plugins/leadquizzes/view/single-leadquiz.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

leadquizzes/leadquizzes.php Passed 13 tests

The main file in "LeadQuizzes" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
29 characters long description:
LeadQuizzes Wordpress Plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected434 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11153444311
CSS2180113
JavaScript242710

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.86
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.23
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon.png0.42KB0.54KB0.00%