83% wp-post-import

Code Review | WP Post Import

WordPress plugin WP Post Import scored83%from 54 tests.

About plugin

  • Plugin page: wp-post-import
  • Plugin version: 1.0
  • PHP compatiblity: 5.5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.9
  • WordPress version: 6.3.1
  • First release: Jun 18, 2019
  • Latest release: Apr 14, 2022
  • Number of updates: 7
  • Update frequency: every 147.4 days
  • Top authors: kudosta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,304 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by WP Post Import
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.15 ▲1.39
Dashboard /wp-admin3.32 ▲0.0144.60 ▼5.53
Posts /wp-admin/edit.php3.37 ▲0.0146.26 ▲0.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.60 ▲5.86
Media Library /wp-admin/upload.php3.24 ▲0.0133.59 ▼1.66

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 260 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Post Import
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5813.15 ▼1.461.71 ▼0.2644.27 ▲2.50
Dashboard /wp-admin2,218 ▲295.84 ▲0.8996.97 ▼12.2789.64 ▲47.95
Posts /wp-admin/edit.php2,104 ▲152.01 ▲0.0036.14 ▲0.5433.73 ▲0.41
Add New Post /wp-admin/post-new.php1,531 ▼1123.27 ▲4.96661.34 ▲75.6747.88 ▼11.79
Media Library /wp-admin/upload.php1,400 ▲184.19 ▲0.03108.99 ▲10.5945.15 ▲0.81

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 102× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_OpenDocument_WriterPart' not found in wp-content/plugins/wp-post-import/Classes/PHPExcel/Writer/OpenDocument/Settings.php:28
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-post-import/Classes/PHPExcel/Shared/trend/linearBestFitClass.php on line 3
    • > PHP Warning
      Use of undefined constant PHPEXCEL_ROOT - assumed 'PHPEXCEL_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-post-import/Classes/PHPExcel/Shared/trend/powerBestFitClass.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/wp-post-import/Classes/PHPExcel/Writer/Excel2007/StringTable.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/wp-post-import/Classes/PHPExcel/Style/Borders.php:28
    • > PHP Warning
      Use of undefined constant PHPEXCEL_ROOT - assumed 'PHPEXCEL_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-post-import/Classes/PHPExcel/Shared/trend/linearBestFitClass.php on line 3
    • > PHP Warning
      Use of undefined constant PHPEXCEL_ROOT - assumed 'PHPEXCEL_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-post-import/Classes/PHPExcel/Shared/trend/logarithmicBestFitClass.php on line 3
    • > PHP Warning
      require_once(PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php): failed to open stream: No such file or directory in wp-content/plugins/wp-post-import/Classes/PHPExcel/Shared/trend/logarithmicBestFitClass.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Worksheet_BaseDrawing' not found in wp-content/plugins/wp-post-import/Classes/PHPExcel/Worksheet/Drawing.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_OpenDocument_WriterPart' not found in wp-content/plugins/wp-post-import/Classes/PHPExcel/Writer/OpenDocument/MetaInf.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (20 tag instead of maximum 10)
The official readme.txt is a good inspiration

wp-post-import/wp-post-import.php 92% from 13 tests

"WP Post Import" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected56,264 lines of code in 220 files:
LanguageFilesBlank linesComment linesLines of code
PHP21710,23834,01055,850
CSS1247209
JavaScript216727205

PHP code 0% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,019)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity47.40
▷ Minimum class complexity1.00
▷ Maximum class complexity1,019.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes206
▷ Abstract classes104.85%
▷ Concrete classes19695.15%
▷ Final classes00.00%
Methods2,819
▷ Static methods62822.28%
▷ Public methods2,22779.00%
▷ Protected methods802.84%
▷ Private methods51218.16%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants750
▷ Global constants567.47%
▷ Class constants69492.53%
▷ Public constants694100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/import-icon.png1.33KB0.63KB▼ 52.80%