10% my-medium-article

Code Review | My Medium Article

WordPress plugin My Medium Article scored10%from 54 tests.

About plugin

  • Plugin page: my-medium-article
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Sep 5, 2020
  • Latest release: Sep 10, 2020
  • Number of updates: 14
  • Update frequency: every 1.9 days
  • Top authors: thiagomatsui (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /722 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/my-medium-article/includes/class-my-medium-article.php+11
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.92MB] [CPU: ▼49.86ms] Passed 4 tests

Server-side resources used by My Medium Article
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.416.15 ▼35.43
Dashboard /wp-admin2.09 ▼1.218.09 ▼43.08
Posts /wp-admin/edit.php2.09 ▼1.279.64 ▼33.60
Add New Post /wp-admin/post-new.php2.09 ▼3.809.51 ▼87.33
Media Library /wp-admin/upload.php2.09 ▼1.147.96 ▼33.24
My Medium Article /wp-admin/options-general.php?page=my-medium-article2.098.57

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_my_medium_article_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for My Medium Article
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.28 ▼0.301.85 ▲0.2041.06 ▼1.58
Dashboard /wp-admin2,203 ▲265.59 ▼0.0792.33 ▼0.9536.34 ▼5.52
Posts /wp-admin/edit.php2,109 ▲62.03 ▲0.0239.61 ▼0.0933.47 ▼2.26
Add New Post /wp-admin/post-new.php1,533 ▼15623.53 ▼0.91688.68 ▲60.7851.06 ▼8.89
Media Library /wp-admin/upload.php1,402 ▲24.26 ▲0.05100.81 ▼8.2441.62 ▼5.85
My Medium Article /wp-admin/options-general.php?page=my-medium-article8872.1725.0530.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/my-medium-article/includes/class-my-medium-article.php+11
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_my_medium_article_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=my-medium-article
    • > Notice in wp-content/plugins/my-medium-article/my-medium-article.php+70
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=my-medium-article
    • > Notice in wp-content/plugins/my-medium-article/includes/class-my-medium-article-admin.php+65
    Undefined variable: medium_id

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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/my-medium-article/includes/class-my-medium-article-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/my-medium-article/my-medium-article.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
7 plugin tags: widgets, posts, mediumcom, shortcodes, embed...

my-medium-article/my-medium-article.php Passed 13 tests

The principal PHP file in "My Medium Article" v. 1.0.0 is loaded by WordPress automatically on each request
103 characters long description:
Display the article list from a Medium using Medium feed and keep always updated even for cached posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected658 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP815378473
PO File1263565
CSS112064
JavaScript211456

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.80
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods2781.82%
▷ Protected methods00.00%
▷ Private methods618.18%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin