84% greenlet-importer

Code Review | Greenlet Importer

WordPress plugin Greenlet Importer scored84%from 54 tests.

About plugin

  • Plugin page: greenlet-importer
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 6.3.1
  • First release: Dec 18, 2020
  • Latest release: Dec 29, 2020
  • Number of updates: 5
  • Update frequency: every 2.2 days
  • Top authors: greenlet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /447 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.05MB] [CPU: ▼3.32ms] Passed 4 tests

This is a short check of server-side resources used by Greenlet Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.91 ▼7.29
Dashboard /wp-admin3.37 ▲0.0643.79 ▼2.87
Posts /wp-admin/edit.php3.48 ▲0.1245.80 ▼0.25
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.97 ▲3.64
Media Library /wp-admin/upload.php3.29 ▲0.0630.78 ▼2.87
Greenlet Importer /wp-admin/themes.php?page=greenlet-importer3.2729.45

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Greenlet Importer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7214.48 ▼0.322.05 ▼0.2942.11 ▲3.12
Dashboard /wp-admin2,213 ▲225.86 ▲0.0598.50 ▼8.0541.67 ▲0.67
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0640.38 ▲1.3536.18 ▲0.99
Add New Post /wp-admin/post-new.php1,545 ▲2618.51 ▼4.50650.34 ▼11.7758.89 ▼1.38
Media Library /wp-admin/upload.php1,395 ▲104.21 ▲0.0194.57 ▼4.7243.43 ▲0.41
Greenlet Importer /wp-admin/themes.php?page=greenlet-importer8876.50152.1229.56

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'GREENLET_IMPORTER_LIBRARY_DIR/background/class-wp-async-request.php' (include_path='.:/usr/share/php') in wp-content/plugins/greenlet-importer/library/class-background-importer.php on line 40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Greenlet\\Importer\\add_action() in wp-content/plugins/greenlet-importer/library/class-importer.php:31
    • > PHP Warning
      require_once(GREENLET_IMPORTER_LIBRARY_DIR/background/class-wp-async-request.php): failed to open stream: No such file or directory in wp-content/plugins/greenlet-importer/library/class-background-importer.php on line 40
    • > PHP Fatal error
      Uncaught Error: Class 'Greenlet\\Importer\\WP_Background_Process' not found in wp-content/plugins/greenlet-importer/library/background/class-settings-importer.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Greenlet\\Importer\\WP_Background_Process' not found in wp-content/plugins/greenlet-importer/library/background/class-posts-importer.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Greenlet\\Importer\\Posts_Importer' not found in wp-content/plugins/greenlet-importer/library/background/class-attachments-importer.php:15
    • > PHP Warning
      Use of undefined constant GREENLET_IMPORTER_LIBRARY_DIR - assumed 'GREENLET_IMPORTER_LIBRARY_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/greenlet-importer/library/class-background-importer.php on line 40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Greenlet\\Importer\\current_user_can() in wp-content/plugins/greenlet-importer/library/class-importer-options.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Greenlet\\Importer\\WP_Background_Process' not found in wp-content/plugins/greenlet-importer/library/background/class-styles-importer.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Greenlet\\Importer\\WP_Background_Process' not found in wp-content/plugins/greenlet-importer/library/background/class-menus-importer.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
9 plugin tags: react, one-click, sites, performance, styles...

greenlet-importer/importer.php 85% from 13 tests

The entry point to "Greenlet Importer" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("greenlet-importer.php" instead of "importer.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin3,886 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4523932,810
PHP12252682797
CSS1130279

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.64
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes218.18%
▷ Concrete classes981.82%
▷ Final classes00.00%
Methods63
▷ Static methods69.52%
▷ Public methods2946.03%
▷ Protected methods2742.86%
▷ Private methods711.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected