83% mk-post-and-page-excerpts-widgets

Code Review | MK Post and Page Excerpts Widgets

WordPress plugin MK Post and Page Excerpts Widgets scored83%from 54 tests.

About plugin

  • Plugin page: mk-post-and-page-...
  • Plugin version: 1.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2013
  • Latest release: May 24, 2021
  • Number of updates: 55
  • Update frequency: every 54.1 days
  • Top authors: manoj_rana91986 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,205 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by MK Post and Page Excerpts Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0942.01 ▲2.09
Dashboard /wp-admin3.40 ▲0.0953.55 ▲3.59
Posts /wp-admin/edit.php3.45 ▲0.0948.89 ▼5.03
Add New Post /wp-admin/post-new.php5.98 ▲0.0995.96 ▲5.75
Media Library /wp-admin/upload.php3.32 ▲0.0938.16 ▲3.09

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_mk_page_widget
widget_theysaidso_widget
widget_mk_post_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for MK Post and Page Excerpts Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.16 ▼0.111.80 ▲0.0946.64 ▲5.09
Dashboard /wp-admin2,195 ▲155.61 ▼0.0389.47 ▲0.7439.62 ▼24.14
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0636.86 ▼3.4132.44 ▼6.15
Add New Post /wp-admin/post-new.php1,526 ▼023.15 ▲0.09642.56 ▼11.8248.52 ▼8.87
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.04106.52 ▲6.4449.07 ▲7.66

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% 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 does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_mk_post_widget
    • db_upgraded
    • widget_mk_page_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mk-post-and-page-excerpts-widgets/mk-post-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mk-post-and-page-excerpts-widgets/mk-post-pages-excerpts-widget.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mk-post-and-page-excerpts-widgets/mk-page-widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

mk-post-and-page-excerpts-widgets/mk-post-pages-excerpts-widget.php 85% from 13 tests

Analyzing the main PHP file in "MK Post and Page Excerpts Widgets" version 1.3
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mk-post-and-page-excerpts-widgets.php" instead of "mk-post-pages-excerpts-widget.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 160 characters long)

Code Analysis Passed 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
There were no executable files found in this plugin381 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34056378
CSS1103

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin