83% wp-gatsby-markdown-exporter

Code Review | WP Gatsby Markdown Exporter

WordPress plugin WP Gatsby Markdown Exporter scored83%from 54 tests.

About plugin

  • Plugin page: wp-gatsby-markdow...
  • Plugin version: 0.3.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 6, 2020
  • Latest release: Jan 16, 2020
  • Number of updates: 5
  • Update frequency: every 4.8 days
  • Top authors: mitchmac (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /2,887 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.41ms] Passed 4 tests

This is a short check of server-side resources used by WP Gatsby Markdown Exporter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.07 ▼9.92
Dashboard /wp-admin3.39 ▲0.0958.17 ▼0.83
Posts /wp-admin/edit.php3.51 ▲0.1554.77 ▲2.08
Add New Post /wp-admin/post-new.php5.97 ▲0.0989.56 ▼10.31
Media Library /wp-admin/upload.php3.32 ▲0.0938.06 ▼0.56

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 185 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

WP Gatsby Markdown Exporter: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.61 ▲0.211.77 ▲0.0043.45 ▼4.17
Dashboard /wp-admin2,214 ▲375.56 ▼0.1090.01 ▼4.8737.33 ▼7.15
Posts /wp-admin/edit.php2,116 ▲191.98 ▼0.0334.36 ▼1.6034.94 ▲0.23
Add New Post /wp-admin/post-new.php1,539 ▲1323.54 ▲0.63692.78 ▼5.6550.80 ▼13.01
Media Library /wp-admin/upload.php1,416 ▲164.14 ▼0.2396.08 ▼14.0242.39 ▼2.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 122× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-gatsby-markdown-exporter/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-gatsby-markdown-exporter/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-gatsby-markdown-exporter/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-gatsby-markdown-exporter/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-gatsby-markdown-exporter/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-gatsby-markdown-exporter/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-gatsby-markdown-exporter/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-gatsby-markdown-exporter/vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-gatsby-markdown-exporter/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-gatsby-markdown-exporter/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php:4

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
4 plugin tags: gatsby, jamstack, export, markdown

wp-gatsby-markdown-exporter/gatsby-markdown-exporter.php 85% from 13 tests

Analyzing the main PHP file in "WP Gatsby Markdown Exporter" version 0.3.3
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-gatsby-markdown-exporter.php" instead of "gatsby-markdown-exporter.php")

Code Analysis 97% 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
Success! There were no dangerous files found in this plugin7,771 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP1521,4842,7006,395
JSON700665
Markdown92710619
XML410078
YAML20614

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 112)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity8.52
▷ Minimum class complexity1.00
▷ Maximum class complexity256.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity112.00
Code structure
Namespaces11
Interfaces7
Traits0
Classes136
▷ Abstract classes10.74%
▷ Concrete classes13599.26%
▷ Final classes32.22%
Methods362
▷ Static methods4311.88%
▷ Public methods24968.78%
▷ Protected methods4612.71%
▷ Private methods6718.51%
Functions37
▷ Named functions2362.16%
▷ Anonymous functions1437.84%
Constants23
▷ Global constants00.00%
▷ Class constants23100.00%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin