62% content-upgrade

Code Review | Content Upgrade

WordPress plugin Content Upgrade scored62%from 54 tests.

About plugin

  • Plugin page: content-upgrade
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.0.3
  • WordPress version: 6.3.1
  • First release: Nov 22, 2017
  • Latest release: Jan 23, 2019
  • Number of updates: 14
  • Update frequency: every 30.6 days
  • Top authors: pabbly (100%)Otto42 (14.29%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /952 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.70ms] 75% from 4 tests

This is a short check of server-side resources used by Content Upgrade
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 7,958.87ms on /wp-admin/admin.php?page=setting_page)
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.87 ▲1.92
Dashboard /wp-admin3.42 ▲0.1249.63 ▼8.07
Posts /wp-admin/edit.php3.53 ▲0.1845.19 ▼2.58
Add New Post /wp-admin/post-new.php6.00 ▲0.1285.64 ▼14.05
Media Library /wp-admin/upload.php3.34 ▲0.1238.97 ▲3.21
Content Upgrade /wp-admin/admin.php?page=setting_page3.397,958.87
Download Button /wp-admin/admin.php?page=ink_dlv3.3132.15
Email Customization /wp-admin/admin.php?page=customization3.3233.24

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 51 new files
Database: 1 new table, 6 new options
New tables
wp_dlv_subscriber
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Content Upgrade
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.72 ▲0.351.92 ▲0.2041.76 ▼5.87
Dashboard /wp-admin2,220 ▲465.54 ▼0.0094.27 ▲4.4676.24 ▲35.66
Posts /wp-admin/edit.php2,119 ▲222.01 ▼0.0333.79 ▼2.9133.65 ▼0.23
Add New Post /wp-admin/post-new.php1,553 ▲2223.10 ▼0.20712.02 ▲63.1056.45 ▲5.32
Media Library /wp-admin/upload.php1,419 ▲194.20 ▲0.02114.75 ▲9.6374.37 ▲27.56
Content Upgrade /wp-admin/admin.php?page=setting_page9152.0223.2630.55
Download Button /wp-admin/admin.php?page=ink_dlv8262.0726.0129.39
Email Customization /wp-admin/admin.php?page=customization8852.0722.6527.00

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 plugin did not uninstall successfully, leaving 1 table in the database
    • wp_dlv_subscriber
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=setting_page
    • > Notice in wp-content/plugins/content-upgrade/mailget_curl.php+80
    Trying to get property 'status' of non-object
    • > GET request to /wp-admin/admin.php?page=setting_page
    • > Warning in wp-content/plugins/content-upgrade/setting.php+113
    Invalid argument supplied for foreach()

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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/content-upgrade/js/dl-popup.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/content-upgrade/dlv_shortcode.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-upgrade/version1.0.0/Dlv_1Point_ZeroOne.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/content-upgrade/customize.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/content-upgrade/setting.php:8

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Screenshot of Content Upgrade Plugin.), #2 (Screenshot of Content Upgrade Plugin option.), #3 (Screenshot of Email Customization option.), #4 (Screenshot of Content Upgrade Insert Button on Post & Page.), #5 (Screenshot of Button Options.), #6 (Screenshot of Short Code of Button.), #7 (Screenshot of Download Button in Blog Post.), #8 (Screenshot of Email Options.), #9 (Screenshot of Sending Email.)
The official readme.txt might help

content-upgrade/dlv_shortcode.php 92% from 13 tests

"Content Upgrade" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("content-upgrade.php" instead of "dlv_shortcode.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
Good job! No executable or dangerous file extensions detected6,997 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,8408893,902
PHP113465492,058
CSS4136231,037

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity38.67
▷ Minimum class complexity1.00
▷ Maximum class complexity215.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods129
▷ Static methods129.30%
▷ Public methods8868.22%
▷ Protected methods00.00%
▷ Private methods4131.78%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
21 PNG files occupy 0.54MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/livedemo.png2.41KB1.31KB▼ 45.67%
images/see_demo.png0.35KB0.53KB0.00%
js/download.png0.76KB0.98KB0.00%
screenshot-3.png59.05KB24.19KB▼ 59.04%
images/formget.png7.55KB3.53KB▼ 53.27%