84% newsup-quiz-embed

Code Review | NewsUp Quiz Embed

WordPress plugin NewsUp Quiz Embed scored84%from 54 tests.

About plugin

  • Plugin page: newsup-quiz-embed
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2016
  • Latest release: Aug 19, 2016
  • Number of updates: 8
  • Update frequency: every 18.5 days
  • Top authors: ahacop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /933 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.29ms] Passed 4 tests

An overview of server-side resources used by NewsUp Quiz Embed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.33 ▼3.07
Dashboard /wp-admin3.31 ▲0.0145.54 ▼11.42
Posts /wp-admin/edit.php3.36 ▲0.0044.67 ▼4.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.46 ▼6.26
Media Library /wp-admin/upload.php3.23 ▲0.0034.26 ▲0.12

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

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

Browser metrics Passed 4 tests

A check of browser resources used by NewsUp Quiz Embed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.25 ▼0.121.58 ▼0.3743.44 ▲2.50
Dashboard /wp-admin2,195 ▲185.62 ▲0.0093.41 ▲2.8038.54 ▼2.76
Posts /wp-admin/edit.php2,100 ▲182.02 ▲0.0135.73 ▼4.1234.20 ▲1.43
Add New Post /wp-admin/post-new.php1,526 ▼023.68 ▲0.35610.43 ▼53.8168.25 ▲20.42
Media Library /wp-admin/upload.php1,391 ▼124.21 ▲0.03100.65 ▲3.6841.20 ▼1.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/newsup-quiz-embed/newsup-quiz-embed.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === newsup-quiz-embed === )
You can look at the official readme.txt

newsup-quiz-embed/newsup-quiz-embed.php Passed 13 tests

"NewsUp Quiz Embed" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
70 characters long description:
Enables shortcode to embed NewsUp quizzes. Usage: [newsup quiz="123"].

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16819

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected