78% wp-for-my-clients

Code Review | WordPress for My Clients

WordPress plugin WordPress for My Clients scored78%from 54 tests.

About plugin

  • Plugin page: wp-for-my-clients
  • Plugin version: 3.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3.1
  • WordPress version: 6.3.1
  • First release: May 22, 2013
  • Latest release: Sep 22, 2015
  • Number of updates: 37
  • Update frequency: every 47.5 days
  • Top authors: hchouhan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /8,003 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼1.68ms] Passed 4 tests

An overview of server-side resources used by WordPress for My Clients
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2242.28 ▼1.35
Dashboard /wp-admin3.56 ▲0.2250.04 ▼4.10
Posts /wp-admin/edit.php3.68 ▲0.2852.42 ▲4.32
Add New Post /wp-admin/post-new.php6.15 ▲0.2295.63 ▼1.56
Media Library /wp-admin/upload.php3.49 ▲0.2240.22 ▲0.29
WP for my Clients /wp-admin/options-general.php?page=dot_wpfmc3.4336.44

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 52 new files
Database: no new tables, 10 new options
New WordPress options
widget_embed
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
widget_flickr
widget_facebook
widget_contact

Browser metrics Passed 4 tests

Checking browser requirements for WordPress for My Clients
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,641 ▼12014.32 ▼0.031.76 ▼0.1740.72 ▼2.52
Dashboard /wp-admin2,050 ▼1225.57 ▼0.1679.07 ▼21.2835.89 ▼11.99
Posts /wp-admin/edit.php2,104 ▲72.03 ▲0.0240.44 ▲4.1636.76 ▲4.91
Add New Post /wp-admin/post-new.php1,535 ▲923.26 ▲0.31681.49 ▲21.6657.47 ▼0.79
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.1196.11 ▼15.0744.81 ▼3.82
WP for my Clients /wp-admin/options-general.php?page=dot_wpfmc1,0431.9736.4830.39

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 detected upon uninstall: 10 options
    • widget_contact
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_embed
    • widget_flickr
    • widget_theysaidso_widget
    • widget_facebook
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dot_wpfmc
    • > Notice in wp-content/plugins/wp-for-my-clients/wordpress-for-my-clients.php+442
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-for-my-clients/includes/widgets/dot-embed.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-for-my-clients/includes/customizer-library/extensions/preview.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-for-my-clients/includes/metabox/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-for-my-clients/includes/gallery-metabox/gallery.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-for-my-clients/includes/customizer-library/extensions/style-builder.php:267
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-for-my-clients/includes/widgets/dot-facebook.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-for-my-clients/includes/widgets/dot-contact.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-for-my-clients/includes/customizer-library/extensions/interface.php:166
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-for-my-clients/includes/metabox/example-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-for-my-clients/includes/widgets/dot-flickr.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt is a good inspiration

wp-for-my-clients/wordpress-for-my-clients.php 85% from 13 tests

The main file in "WordPress for My Clients" v. 3.1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 171 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-for-my-clients.php" instead of "wordpress-for-my-clients.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
Everything looks great! No dangerous files found in this plugin13,666 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP229711,79310,262
JavaScript73413922,274
CSS36121551
Markdown31670533
PO File1162246

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity36.50
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods210
▷ Static methods3617.14%
▷ Public methods20698.10%
▷ Protected methods20.95%
▷ Private methods20.95%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/metabox/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
includes/metabox/images/ico-delete.png0.70KB0.72KB0.00%
includes/metabox/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
includes/metabox/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
includes/metabox/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%