67% excel-report-maker

Code Review | Excel Report Maker

WordPress plugin Excel Report Maker scored67%from 54 tests.

About plugin

  • Plugin page: excel-report-maker
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2015
  • Latest release: Jul 17, 2015
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: Yuichiro ABE (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,815 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.92MB] [CPU: ▼39.93ms] Passed 4 tests

This is a short check of server-side resources used by Excel Report Maker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.17 ▲1.80
Dashboard /wp-admin3.03 ▼0.2823.85 ▼27.31
Posts /wp-admin/edit.php3.03 ▼0.3328.15 ▼21.01
Add New Post /wp-admin/post-new.php3.03 ▼2.8623.47 ▼99.63
Media Library /wp-admin/upload.php3.03 ▼0.2023.09 ▼11.78
Excel Reports /wp-admin/options-general.php?page=excel-report-maker3.0324.65
Add New /wp-admin/post-new.php?post_type=excel_report3.0325.88
All Excel Reports /wp-admin/edit.php?post_type=excel_report3.0324.59

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Excel Report Maker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲9814.22 ▼0.011.78 ▼1.3341.72 ▼0.13
Dashboard /wp-admin2,230 ▲505.53 ▼0.1584.62 ▼13.1439.36 ▼8.78
Posts /wp-admin/edit.php2,138 ▲352.00 ▲0.0442.22 ▲3.4436.00 ▲2.46
Add New Post /wp-admin/post-new.php1,559 ▲3323.01 ▼0.84668.96 ▲5.8356.96 ▲3.84
Media Library /wp-admin/upload.php1,432 ▲324.26 ▲0.06115.28 ▲3.7348.74 ▲5.29
Excel Reports /wp-admin/options-general.php?page=excel-report-maker9272.0127.5125.68
Add New /wp-admin/post-new.php?post_type=excel_report1,6252.5554.4862.82
All Excel Reports /wp-admin/edit.php?post_type=excel_report1,1021.9230.5928.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=excel_report
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=excel-report-maker
    • > Notice in wp-content/plugins/excel-report-maker/ui-option.php+19
    Undefined index: excel-report-maker-action
    • > GET request to /wp-admin/post-new.php?post_type=excel_report
    • > Warning in wp-content/plugins/excel-report-maker/ui-excel_report_metabox.php+47
    Invalid argument supplied for foreach()

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 90× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Settings' not found in wp-content/plugins/excel-report-maker/phpexcel/Classes/PHPExcel/Writer/PDF/mPDF.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPExcel_RichText_ITextElement' not found in wp-content/plugins/excel-report-maker/phpexcel/Classes/PHPExcel/RichText/TextElement.php:34
    • > 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/excel-report-maker/phpexcel/Classes/PHPExcel/Shared/trend/exponentialBestFitClass.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Settings' not found in wp-content/plugins/excel-report-maker/phpexcel/Classes/PHPExcel/Chart/Renderer/jpgraph.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/excel-report-maker/phpexcel/Classes/PHPExcel/Writer/Excel2007/Drawing.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/excel-report-maker/phpexcel/Classes/PHPExcel/CachedObjectStorage/Memory.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/excel-report-maker/phpexcel/Classes/PHPExcel/Writer/Excel2007/StringTable.php:36
    • > 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/excel-report-maker/phpexcel/Classes/PHPExcel/Shared/trend/linearBestFitClass.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_RichText_TextElement' not found in wp-content/plugins/excel-report-maker/phpexcel/Classes/PHPExcel/RichText/Run.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/excel-report-maker/phpexcel/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Please add images for these screenshots: #1 (Open Setting -> Excel Reports), #2 (Entry new Excel report.), #3 (Report button and row action), #4 (Report button in Edit page), #5 (Click Report button or row action, then down load report.)
You can take inspiration from this readme.txt

excel-report-maker/excel-report-maker.php Passed 13 tests

"Excel Report Maker" version 0.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
42 characters long description:
set post and postmeta values to excel file

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin51,924 lines of code in 201 files:
LanguageFilesBlank linesComment linesLines of code
PHP19411,67235,70751,604
JavaScript2285105
PO File14346105
Bourne Shell120573
XML10014
CSS12012
JSON11011

PHP code 0% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,176)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity55.02
▷ Minimum class complexity1.00
▷ Maximum class complexity1,176.00
Average method complexity4.76
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces1
Interfaces7
Traits0
Classes182
▷ Abstract classes63.30%
▷ Concrete classes17696.70%
▷ Final classes00.00%
Methods2,735
▷ Static methods62122.71%
▷ Public methods2,23181.57%
▷ Protected methods311.13%
▷ Private methods47317.29%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants799
▷ Global constants11814.77%
▷ Class constants68185.23%
▷ Public constants681100.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
5 PNG files occupy 0.44MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png88.97KB26.42KB▼ 70.31%
screenshot-1.png67.07KB18.99KB▼ 71.68%
screenshot-5.png30.06KB9.77KB▼ 67.51%
screenshot-4.png138.15KB42.05KB▼ 69.56%
screenshot-2.png131.26KB39.19KB▼ 70.14%