78% productive-demo-importer

Code Review | Productive Demo Importer

WordPress plugin Productive Demo Importer scored78%from 54 tests.

About plugin

  • Plugin page: productive-demo-i...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 29, 2022
  • Latest release: Oct 21, 2023
  • Number of updates: 52
  • Update frequency: every 6.9 days
  • Top authors: productiveminds (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,812 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
Installer ran successfully

Server metrics [RAM: ▲0.93MB] [CPU: ▼0.28ms] Passed 4 tests

Server-side resources used by Productive Demo Importer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.41 ▲0.9443.02 ▲4.15
Dashboard /wp-admin4.24 ▲0.9353.86 ▲4.61
Posts /wp-admin/edit.php4.29 ▲0.9347.16 ▲1.21
Add New Post /wp-admin/post-new.php6.82 ▲0.9385.30 ▼11.11
Media Library /wp-admin/upload.php4.16 ▲0.9345.10 ▲11.76
Productive Demo Importer /wp-admin/admin.php?page=productive_demo_importer_options_submenu4.1333.74
Productive... /wp-admin/admin.php?page=productive_options_overview4.0535.41

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 65 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
productive_demo_importer_current_db_version
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Productive Demo Importer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.41 ▲0.061.67 ▲0.0543.84 ▲2.62
Dashboard /wp-admin2,218 ▲385.58 ▼0.1886.54 ▼0.3942.84 ▲2.53
Posts /wp-admin/edit.php2,123 ▲232.01 ▲0.0235.42 ▼2.1735.01 ▲0.91
Add New Post /wp-admin/post-new.php1,545 ▲1022.97 ▲4.68662.69 ▲40.6269.14 ▲2.22
Media Library /wp-admin/upload.php1,420 ▲174.20 ▲0.04108.08 ▲9.0747.73 ▲4.30
Productive Demo Importer /wp-admin/admin.php?page=productive_demo_importer_options_submenu1,1282.0326.6342.54
Productive... /wp-admin/admin.php?page=productive_options_overview1,1492.0123.6443.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/productive-demo-importer/admin/common/options/global/productiveminds-social-share.php:137
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/productive-demo-importer/admin/common/options/global/global-settings-admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/productive-demo-importer/admin/common/options/global/productiveminds-icons.php:463

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=productive_options_overview
    • > Network (severe)
    wp-content/plugins/productive-demo-importer/public/images/plugin-icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

productive-demo-importer/productive-demo-importer.php 92% from 13 tests

The entry point to "Productive Demo Importer" version 1.1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 318 characters long)

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
Good job! No executable or dangerous file extensions detected5,957 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP286805655,016
CSS1710836
JavaScript113996
JSON9009

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.25
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes1100.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions253
▷ Named functions253100.00%
▷ Anonymous functions00.00%
Constants88
▷ Global constants7686.36%
▷ Class constants1213.64%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/productivemedia/icons/check-circle.png5.45KB2.58KB▼ 52.71%
public/images/productivemedia/icons/check.png3.05KB1.70KB▼ 44.22%
public/images/productivemedia/icons/close-circle.png6.21KB2.75KB▼ 55.79%
public/images/productivemedia/icons/close.png3.46KB1.76KB▼ 49.15%
public/images/productivemedia/icons/check-jagged.png3.41KB1.91KB▼ 43.99%