78% wp-excel-2-db

Code Review | WP Excel 2 DB

WordPress plugin WP Excel 2 DB scored78%from 54 tests.

About plugin

  • Plugin page: wp-excel-2-db
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-4.7.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2017
  • Latest release: Jan 25, 2017
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: hussam7ussien (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /3,014 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.50ms] Passed 4 tests

An overview of server-side resources used by WP Excel 2 DB
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.31 ▲3.64
Dashboard /wp-admin3.37 ▲0.0748.11 ▼2.07
Posts /wp-admin/edit.php3.48 ▲0.1346.45 ▲0.05
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.28 ▼2.14
Media Library /wp-admin/upload.php3.29 ▲0.0633.77 ▲2.18
Excel Uploader /wp-admin/options-general.php?page=media-selector3.2833.49

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

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

Browser metrics Passed 4 tests

WP Excel 2 DB: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲18113.97 ▼0.418.69 ▲6.9743.08 ▼6.22
Dashboard /wp-admin2,214 ▲295.86 ▲0.00120.15 ▲20.4549.81 ▲7.49
Posts /wp-admin/edit.php2,097 ▲262.02 ▼0.0334.34 ▼1.4635.14 ▼0.63
Add New Post /wp-admin/post-new.php1,521 ▲423.35 ▲5.77659.16 ▲35.0861.89 ▲4.32
Media Library /wp-admin/upload.php1,396 ▲54.29 ▲0.0797.35 ▼1.4542.18 ▼0.72
Excel Uploader /wp-admin/options-general.php?page=media-selector9603.0039.0222.20

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 detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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 0% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-excel-2-db/public/partials/wp-excel-2-db-public-display.php
    • > /wp-content/plugins/wp-excel-2-db/admin/partials/wp-excel-2-db-admin-display.php
  • 101× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Abstract' not found in wp-content/plugins/wp-excel-2-db/public/phpexcel/Classes/PHPExcel/Writer/HTML.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Shared_OLE_PPS' not found in wp-content/plugins/wp-excel-2-db/public/phpexcel/Classes/PHPExcel/Shared/OLE/PPS/File.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/wp-excel-2-db/public/phpexcel/Classes/PHPExcel/Style/Alignment.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel5_BIFFwriter' not found in wp-content/plugins/wp-excel-2-db/public/phpexcel/Classes/PHPExcel/Writer/Excel5/Workbook.php:63
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/wp-excel-2-db/public/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/wp-excel-2-db/public/phpexcel/Classes/PHPExcel/Writer/Excel2007/Chart.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/wp-excel-2-db/public/phpexcel/Classes/PHPExcel/Style.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_OpenDocument_WriterPart' not found in wp-content/plugins/wp-excel-2-db/public/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Styles.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-excel-2-db/public/phpexcel/Classes/PHPExcel/Shared/trend/powerBestFitClass.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-excel-2-db/public/phpexcel/Classes/PHPExcel/Shared/trend/polynomialBestFitClass.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: import, database, reader, table, excel...

wp-excel-2-db/wp-excel-2-db.php Passed 13 tests

"WP Excel 2 DB" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
72 characters long description:
Import excel sheet to wordpress database table form wordpress dashboard.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected58,201 lines of code in 231 files:
LanguageFilesBlank linesComment linesLines of code
PHP22710,89436,30358,141
JavaScript2133560
CSS2080

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,019)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity48.11
▷ Minimum class complexity1.00
▷ Maximum class complexity1,019.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes213
▷ Abstract classes104.69%
▷ Concrete classes20395.31%
▷ Final classes00.00%
Methods2,889
▷ Static methods63021.81%
▷ Public methods2,29279.34%
▷ Protected methods802.77%
▷ Private methods51717.90%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants812
▷ Global constants11814.53%
▷ Class constants69485.47%
▷ Public constants694100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.49MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png48.21KB12.67KB▼ 73.72%
assets/screenshot-2.png116.75KB18.65KB▼ 84.02%
assets/icon-128x128.png3.40KB2.20KB▼ 35.43%
assets/icon-256x256.png7.03KB3.94KB▼ 43.93%
assets/screenshot-5.png55.01KB15.75KB▼ 71.36%