84% post-to-dev-to

Code Review | Post to Dev.to

WordPress plugin Post to Dev.to scored 84% from 54 tests.

About plugin

  • Plugin page: post-to-dev-to
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.2-5.6.2
  • WordPress version: 6.3.1
  • First release: Aug 2, 2019
  • Latest release: Mar 3, 2021
  • Number of updates: 4
  • Update frequency: every 145.5 days
  • Top authors: rich_ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 574 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.10ms] Passed 4 tests

This is a short check of server-side resources used by Post to Dev.to
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.70 ▼0.95
Dashboard /wp-admin3.31 ▲0.0145.66 ▼6.32
Posts /wp-admin/edit.php3.36 ▲0.0055.07 ▲8.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.49 ▲0.98
Media Library /wp-admin/upload.php3.23 ▲0.0032.96 ▲1.89

Server storage [IO: ▲0.09MB] [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: 46 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Post to Dev.to: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11013.15 ▼1.262.04 ▲0.1943.93 ▼1.18
Dashboard /wp-admin2,206 ▲155.91 ▲1.02105.98 ▲1.9640.63 ▲1.04
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0040.77 ▲0.9535.79 ▲0.21
Add New Post /wp-admin/post-new.php1,534 ▲2023.02 ▲5.39590.34 ▼90.1756.15 ▲3.57
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0195.20 ▼1.3640.77 ▼5.15

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 19× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/post-to-dev-to/vendor/league/html-to-markdown/src/Converter/ListItemConverter.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/post-to-dev-to/vendor/league/html-to-markdown/src/Converter/BlockquoteConverter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/post-to-dev-to/vendor/league/html-to-markdown/src/Converter/HorizontalRuleConverter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/post-to-dev-to/vendor/league/html-to-markdown/src/Converter/ImageConverter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/post-to-dev-to/vendor/league/html-to-markdown/src/Converter/EmphasisConverter.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/post-to-dev-to/vendor/league/html-to-markdown/src/Converter/LinkConverter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/post-to-dev-to/vendor/league/html-to-markdown/src/Converter/TextConverter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/post-to-dev-to/vendor/league/html-to-markdown/src/Converter/ListBlockConverter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/post-to-dev-to/vendor/league/html-to-markdown/src/Converter/HeaderConverter.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/post-to-dev-to/vendor/league/html-to-markdown/src/Converter/ParagraphConverter.php:7

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
1 plugin tags: markdown

post-to-dev-to/index.php 92% from 13 tests

The main file in "Post to Dev.to" v. 0.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-to-dev-to.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,964 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP333787221,422
Markdown31450349
JSON300121
CSS11145
JavaScript10327

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity7.68
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces4
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes14.17%
Methods134
▷ Static methods42.99%
▷ Public methods11888.06%
▷ Protected methods21.49%
▷ Private methods1410.45%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin