79% rara-one-click-demo-import

Code Review | Rara One Click Demo Import

WordPress plugin Rara One Click Demo Import scored79%from 54 tests.

About plugin

  • Plugin page: rara-one-click-de...
  • Plugin version: 1.3.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 25, 2017
  • Latest release: May 31, 2023
  • Number of updates: 182
  • Update frequency: every 12.3 days
  • Top authors: raratheme (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

40,000+ active /742,635 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.48MB] [CPU: ▼2.59ms] Passed 4 tests

A check of server-side resources used by Rara One Click Demo Import
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5539.82 ▲1.72
Dashboard /wp-admin3.83 ▲0.4848.90 ▼11.67
Posts /wp-admin/edit.php3.88 ▲0.5252.88 ▲6.64
Add New Post /wp-admin/post-new.php6.35 ▲0.4698.37 ▼2.08
Media Library /wp-admin/upload.php3.69 ▲0.4638.41 ▲1.69

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Rara One Click Demo Import
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.39 ▼1.011.73 ▲0.0441.33 ▼1.05
Dashboard /wp-admin2,206 ▲155.86 ▲0.98100.49 ▲3.2638.40 ▼1.70
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0340.08 ▲7.0734.11 ▲2.73
Add New Post /wp-admin/post-new.php1,533 ▲1423.13 ▼0.27652.00 ▼21.5458.20 ▲2.38
Media Library /wp-admin/upload.php1,391 ▲64.19 ▼0.0198.16 ▼4.7543.93 ▼2.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/rara-one-click-demo-import/rara-one-click-demo-import.php
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require(): Failed opening required 'RRDI_PATHincludes/extras/class-logger.php' (include_path='.:/usr/share/php') in wp-content/plugins/rara-one-click-demo-import/includes/class-rrdi-logger.php on line 9
    • > PHP Warning
      Use of undefined constant RRDI_PATH - assumed 'RRDI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/rara-one-click-demo-import/includes/class-rrdi-include-files.php on line 16
    • > PHP Warning
      Use of undefined constant RRDI_PATH - assumed 'RRDI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/rara-one-click-demo-import/includes/class-rrdi-wxr-importer.php on line 11
    • > PHP Warning
      require(RRDI_PATHincludes/extras/class-wxr-importer.php): failed to open stream: No such file or directory in wp-content/plugins/rara-one-click-demo-import/includes/class-rrdi-wxr-importer.php on line 11
    • > PHP Fatal error
      require(): Failed opening required 'RRDI_PATHincludes/class-rrdi-helpers.php' (include_path='.:/usr/share/php') in wp-content/plugins/rara-one-click-demo-import/includes/class-rrdi-include-files.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Upgrader' not found in wp-content/plugins/rara-one-click-demo-import/includes/vendor/class-demo-upgrader.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/rara-one-click-demo-import/includes/class-rrdi-init.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'RDDI_WP_Importer_Logger' not found in wp-content/plugins/rara-one-click-demo-import/includes/extras/class-logger-cli.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/rara-one-click-demo-import/includes/settings/intro.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/rara-one-click-demo-import/includes/class-rrdi-customizer-option.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: content, widgets, import, data, settings...

rara-one-click-demo-import/rara-one-click-demo-import.php Passed 13 tests

"Rara One Click Demo Import" version 1.3.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
90 characters long description:
Import demo content, widgets and settings of themes made by RaraTheme with just one click.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected3,310 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP208551,4563,080
CSS1327133
JavaScript114997

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity32.27
▷ Minimum class complexity1.00
▷ Maximum class complexity262.00
Average method complexity4.72
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods127
▷ Static methods2318.11%
▷ Public methods7256.69%
▷ Protected methods3426.77%
▷ Private methods2116.54%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.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
PNG images were not found in this plugin