78% ic-importer

Code Review | IC Importer - Import posts and pages from google spreadsheet

WordPress plugin IC Importer - Import posts and pages from google spreadsheet scored78%from 54 tests.

About plugin

  • Plugin page: ic-importer
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Feb 1, 2022
  • Latest release: May 25, 2022
  • Number of updates: 7
  • Update frequency: every 16.1 days
  • Top authors: itclan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /717 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.94ms] Passed 4 tests

Server-side resources used by IC Importer - Import posts and pages from google spreadsheet
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.18 ▲1.05
Dashboard /wp-admin3.32 ▲0.0243.77 ▼3.43
Posts /wp-admin/edit.php3.37 ▲0.0143.82 ▼0.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.32 ▼6.12
Media Library /wp-admin/upload.php3.24 ▲0.0133.26 ▼1.35

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 1,011 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

IC Importer - Import posts and pages from google spreadsheet: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.31 ▼1.441.64 ▼0.1943.97 ▼0.77
Dashboard /wp-admin2,218 ▲305.77 ▲0.8899.05 ▼17.1138.52 ▼6.33
Posts /wp-admin/edit.php2,101 ▲92.00 ▼0.0533.89 ▼3.9034.39 ▲2.01
Add New Post /wp-admin/post-new.php1,538 ▲2418.08 ▲0.42637.04 ▼50.9756.28 ▲6.45
Media Library /wp-admin/upload.php1,400 ▲94.18 ▼0.0194.81 ▼3.4041.25 ▼4.83

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ic-importer/inc/lib/vendor/markbaker/matrix/buildPhar.php
  • 337× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_HTMLModule' not found in wp-content/plugins/ic-importer/inc/lib/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Scripting.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'ZipStream\\Stream' not found in wp-content/plugins/ic-importer/inc/lib/vendor/maennchen/zipstream-php/src/DeflateStream.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\Distributions\\GammaBase' not found in wp-content/plugins/ic-importer/inc/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php:8
    • > PHP Warning
      include(wp-content/plugins/ic-importer/inc/lib/vendor/markbaker/complex/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/ic-importer/inc/lib/vendor/markbaker/complex/examples/testFunctions.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\DefinedName' not found in wp-content/plugins/ic-importer/inc/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/NamedFormula.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\WriterPart' not found in wp-content/plugins/ic-importer/inc/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Settings.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrTransform' not found in wp-content/plugins/ic-importer/inc/lib/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Textarea.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Cell\\DefaultValueBinder' not found in wp-content/plugins/ic-importer/inc/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_Strategy' not found in wp-content/plugins/ic-importer/inc/lib/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Shared\\Trend\\BestFit' not found in wp-content/plugins/ic-importer/inc/lib/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

ic-importer/ic-importer.php Passed 13 tests

"IC Importer - Import posts and pages from google spreadsheet" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
70 characters long description:
The most powerful solution for import posts and pages from spreadsheet

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin96,278 lines of code in 816 files:
LanguageFilesBlank linesComment linesLines of code
PHP76519,09650,40293,095
Markdown2250601,375
JSON13001,171
YAML5510237
CSS33717165
JavaScript31611129
XML4204105
INI1111

PHP code 0% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,011)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 333)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity19.29
▷ Minimum class complexity1.00
▷ Maximum class complexity1,011.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity333.00
Code structure
Namespaces85
Interfaces27
Traits0
Classes711
▷ Abstract classes425.91%
▷ Concrete classes66994.09%
▷ Final classes40.60%
Methods5,241
▷ Static methods1,59630.45%
▷ Public methods3,94075.18%
▷ Protected methods2584.92%
▷ Private methods1,04319.90%
Functions82
▷ Named functions4656.10%
▷ Anonymous functions3643.90%
Constants1,152
▷ Global constants151.30%
▷ Class constants1,13798.70%
▷ Public constants1,06293.40%

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
3 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/mouse-drag.png1.34KB1.47KB0.00%
admin/images/missing-feature.png30.18KB11.12KB▼ 63.15%
admin/images/support.png35.72KB15.16KB▼ 57.55%