84% mfs-post-viewer

Code Review | MFS Post Viewer

WordPress plugin MFS Post Viewer scored84%from 54 tests.

About plugin

  • Plugin page: mfs-post-viewer
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-3.9.1
  • WordPress version: 6.3.1
  • First release: May 6, 2014
  • Latest release: Jun 3, 2014
  • Number of updates: 11
  • Update frequency: every 3.1 days
  • Top authors: Mindfire-Solutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,194 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.05MB] [CPU: ▼10.81ms] Passed 4 tests

An overview of server-side resources used by MFS Post Viewer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.72 ▼8.00
Dashboard /wp-admin3.36 ▲0.0249.34 ▼12.75
Posts /wp-admin/edit.php3.41 ▲0.0646.36 ▼8.25
Add New Post /wp-admin/post-new.php5.94 ▲0.0686.84 ▼14.23
Media Library /wp-admin/upload.php3.28 ▲0.0639.39 ▲3.73

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

Browser metrics Passed 4 tests

An overview of browser requirements for MFS Post Viewer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲18313.61 ▼0.976.95 ▲4.8543.29 ▼10.07
Dashboard /wp-admin2,229 ▲265.84 ▲0.96101.62 ▼11.3540.98 ▼1.46
Posts /wp-admin/edit.php2,108 ▲82.03 ▼0.0040.43 ▲0.2036.24 ▼0.27
Add New Post /wp-admin/post-new.php1,534 ▲823.16 ▲5.56635.30 ▼46.7050.32 ▲0.95
Media Library /wp-admin/upload.php1,405 ▲54.27 ▲0.04100.50 ▼10.7439.82 ▼6.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_mfs_post_viewer
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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 | 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mfs-post-viewer/mfs-post-viewer.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

mfs-post-viewer/mfs-post-viewer.php Passed 13 tests

The primary PHP file in "MFS Post Viewer" version 1.0 is used by WordPress to initiate all plugin functionality
34 characters long description:
Displays posts using custom widget

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin357 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP11035176
JavaScript2924112
CSS241369

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity9.40
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.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