78% dot-monetize-polls-quizzes

Code Review | DOT | Monetize Polls & Quizzes

WordPress plugin DOT | Monetize Polls & Quizzes scored78%from 54 tests.

About plugin

  • Plugin page: dot-monetize-poll...
  • Plugin version: 1.0.17
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2020
  • Latest release: Oct 27, 2020
  • Number of updates: 19
  • Update frequency: every 2.4 days
  • Top authors: dottech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /801 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼2.65ms] Passed 4 tests

Server-side resources used by DOT | Monetize Polls & Quizzes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2645.88 ▲9.48
Dashboard /wp-admin3.54 ▲0.2444.93 ▲0.61
Posts /wp-admin/edit.php3.59 ▲0.2447.81 ▲1.05
Add New Post /wp-admin/post-new.php6.06 ▲0.1784.33 ▼16.09
Media Library /wp-admin/upload.php3.40 ▲0.1734.47 ▲3.82
DOT /wp-admin/options-general.php?page=dot-press3.3732.27

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 91 new files
Database: no new tables, 7 new options
New WordPress options
category_children
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for DOT | Monetize Polls & Quizzes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲16414.49 ▲0.1222.45 ▲20.7143.23 ▲0.58
Dashboard /wp-admin2,210 ▲184.84 ▼0.14107.79 ▼8.4038.94 ▼5.38
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0238.03 ▼1.9935.26 ▼1.99
Add New Post /wp-admin/post-new.php1,545 ▲818.75 ▼4.42592.67 ▼129.9152.91 ▼9.45
Media Library /wp-admin/upload.php1,392 ▲44.15 ▼0.0794.83 ▼20.4443.07 ▼3.29
DOT /wp-admin/options-general.php?page=dot-press8717.57212.0344.04

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • category_children
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/dot-monetize-polls-quizzes/views/admin-page.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dot-monetize-polls-quizzes/constants.php:4

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: quizzes, monetization, polls

dot-monetize-polls-quizzes/dot-press.php 85% from 13 tests

Analyzing the main PHP file in "DOT | Monetize Polls & Quizzes" version 1.0.17
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "5.2")
  • Main file name: The principal plugin file should be the same as the plugin slug ("dot-monetize-polls-quizzes.php" instead of "dot-press.php")

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
Success! There were no dangerous files found in this plugin6,571 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3131193,249
TypeScript55292212,464
PHP20202132858

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.27
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods67
▷ Static methods1319.40%
▷ Public methods5683.58%
▷ Protected methods00.00%
▷ Private methods1116.42%
Functions19
▷ Named functions315.79%
▷ Anonymous functions1684.21%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 1.88MB with 1.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/dist/no-widgets.6e4567e8.png367.60KB79.50KB▼ 78.37%
js/src/assets/dot-mobiles.png366.62KB90.20KB▼ 75.40%
assets/icon-256x256.png6.31KB2.01KB▼ 68.06%
assets/banner-1544x500.png343.86KB69.70KB▼ 79.73%
js/src/assets/no-widgets.png367.60KB79.50KB▼ 78.37%