84% mstw-csv-exporter

Code Review | MSTW CSV EXPORTER

WordPress plugin MSTW CSV EXPORTER scored84%from 54 tests.

About plugin

  • Plugin page: mstw-csv-exporter
  • Plugin version: 1.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2014
  • Latest release: Sep 20, 2023
  • Number of updates: 35
  • Update frequency: every 92.8 days
  • Top authors: MarkODonnell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,898 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼2.47ms] Passed 4 tests

This is a short check of server-side resources used by MSTW CSV EXPORTER
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.59 ▲3.06
Dashboard /wp-admin3.50 ▲0.2046.03 ▼0.96
Posts /wp-admin/edit.php3.62 ▲0.2646.76 ▲3.68
Add New Post /wp-admin/post-new.php6.10 ▲0.2282.78 ▼14.81
Media Library /wp-admin/upload.php3.43 ▲0.2035.62 ▲2.82

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
mstw_csvx_version
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for MSTW CSV EXPORTER
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.46 ▲0.091.78 ▲0.0640.26 ▼0.27
Dashboard /wp-admin2,218 ▲305.88 ▼0.1498.29 ▼4.5091.02 ▲48.41
Posts /wp-admin/edit.php2,104 ▲152.02 ▼0.0337.26 ▲0.1831.44 ▼5.04
Add New Post /wp-admin/post-new.php1,682 ▲13722.48 ▲4.11729.43 ▲100.3949.82 ▼15.33
Media Library /wp-admin/upload.php1,397 ▲124.25 ▼0.0199.10 ▲2.7443.58 ▼0.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • mstw_csvx_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template() in wp-content/plugins/mstw-csv-exporter/includes/mstw-csvx-globals.php:23
    • > PHP Warning
      include_once(WP_PLUGIN_DIR/mstw-csv-exporter/includes/mstw-csvx-globals.php): failed to open stream: No such file or directory in wp-content/plugins/mstw-csv-exporter/mstw-csv-exporter.php on line 40
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/mstw-csv-exporter/mstw-csv-exporter.php on line 40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mstw-csv-exporter/templates/mstw-csv-settings.php:24
    • > PHP Warning
      include_once(): Failed opening 'WP_PLUGIN_DIR/mstw-csv-exporter/includes/mstw-csvx-globals.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mstw-csv-exporter/mstw-csv-exporter.php on line 40
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mstw-csv-exporter/includes/mstw-csvx-globals.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/mstw-csv-exporter/mstw-csv-exporter.php:42

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: mstw schedules scoreboards, schedules scoreboards, csv, team rosters, mstw team rosters...

mstw-csv-exporter/mstw-csv-exporter.php 92% from 13 tests

The main PHP file in "MSTW CSV EXPORTER" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 161 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,293 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP63087381,275
JavaScript141014
CSS14234

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/mstw-admin-menu-icon.png51.45KB0.27KB▼ 99.47%