84% m4wp-portfolio

Code Review | M4WP Portfolio

WordPress plugin M4WP Portfolio scored84%from 54 tests.

About plugin

  • Plugin page: m4wp-portfolio
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-4.5
  • WordPress version: 6.3.1
  • First release: Dec 13, 2015
  • Latest release: Apr 13, 2016
  • Number of updates: 10
  • Update frequency: every 19.6 days
  • Top authors: helloguna1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /13,610 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.67ms] Passed 4 tests

Analyzing server-side resources used by M4WP Portfolio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.39 ▼5.15
Dashboard /wp-admin3.35 ▲0.0549.07 ▼5.90
Posts /wp-admin/edit.php3.40 ▲0.0553.66 ▲5.39
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.59 ▼29.01
Media Library /wp-admin/upload.php3.28 ▲0.0538.81 ▲5.38
All Portfolio Items /wp-admin/edit.php?post_type=portfolio3.3237.55
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolio3.2736.48
Add New Item /wp-admin/post-new.php?post_type=portfolio3.3956.88
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tag&post_type=portfolio3.2735.17

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by M4WP Portfolio
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15313.42 ▼0.737.77 ▲5.9643.70 ▼1.67
Dashboard /wp-admin2,234 ▲605.55 ▼0.0987.59 ▼3.1539.65 ▼6.87
Posts /wp-admin/edit.php2,136 ▲361.96 ▼0.0039.28 ▼2.0136.25 ▼2.44
Add New Post /wp-admin/post-new.php1,561 ▲3523.11 ▼0.42604.31 ▼48.9466.57 ▲15.47
Media Library /wp-admin/upload.php1,436 ▲394.20 ▼0.02102.05 ▼5.5741.82 ▼3.44
All Portfolio Items /wp-admin/edit.php?post_type=portfolio1,1161.9031.9239.78
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolio1,3102.1227.8330.93
Add New Item /wp-admin/post-new.php?post_type=portfolio2,4957.76178.5870.29
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tag&post_type=portfolio1,3162.1226.8530.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/m4wp-portfolio/admin/partials/m4wp-portfolio-admin-display.php
    • > /wp-content/plugins/m4wp-portfolio/public/partials/m4wp-portfolio-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === m4wp-portfolio === )
You can take inspiration from this readme.txt

m4wp-portfolio/m4wp-portfolio.php Passed 13 tests

The main file in "M4WP Portfolio" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
56 characters long description:
Adds the custom post type Portfolio and it's taxonomies.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin366 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15174601360
JavaScript24546
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.80
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin