72% wp-company-info

Code Review | WP Company Info

WordPress plugin WP Company Info scored72%from 54 tests.

About plugin

  • Plugin page: wp-company-info
  • Plugin version: 1.9.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Sep 4, 2015
  • Latest release: Mar 28, 2018
  • Number of updates: 122
  • Update frequency: every 7.7 days
  • Top authors: bdeleasa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /3,505 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼12.01ms] Passed 4 tests

Analyzing server-side resources used by WP Company Info
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.49 ▼13.10
Dashboard /wp-admin3.45 ▲0.1054.40 ▼13.91
Posts /wp-admin/edit.php3.50 ▲0.1452.83 ▼2.22
Add New Post /wp-admin/post-new.php5.97 ▲0.0889.95 ▼18.79
Media Library /wp-admin/upload.php3.31 ▲0.0840.09 ▲0.55
Contact Information /wp-admin/options-general.php?page=contact-information3.7339.53
Social Network Links /wp-admin/options-general.php?page=social-links3.4437.72

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 361 new files
Database: no new tables, 9 new options
New WordPress options
widget_wpci_logo_widget
db_upgraded
widget_recent-posts
recovery_mode_email_last_sent
widget_theysaidso_widget
widget_wpci_social_network_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP Company Info
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.27 ▼0.151.61 ▼0.1040.23 ▼0.62
Dashboard /wp-admin2,203 ▲265.63 ▲0.0385.69 ▼3.0140.54 ▼4.43
Posts /wp-admin/edit.php2,131 ▲312.03 ▲0.0836.48 ▼0.9836.20 ▲2.51
Add New Post /wp-admin/post-new.php1,534 ▲823.30 ▲0.59658.06 ▲1.7052.72 ▲2.62
Media Library /wp-admin/upload.php1,411 ▲114.23 ▼0.04100.47 ▼4.3441.58 ▼5.25
Contact Information /wp-admin/options-general.php?page=contact-information7211.516.6022.68
Social Network Links /wp-admin/options-general.php?page=social-links1,0072.0926.0539.83

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
The following items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_wpci_social_network_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_wpci_logo_widget
    • can_compress_scripts
    • recovery_mode_email_last_sent

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=contact-information
    • > Compile error in wp-content/plugins/wp-company-info/includes/cmb2/includes/types/CMB2_Type_Checkbox.php+35
    Declaration of CMB2_Type_Checkbox::render() must be compatible with CMB2_Type_Text::render($args = Array)

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-company-info/plugin-addons/wp-admin-instructions/view/tab-company-info.php
  • 35× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/wp-company-info/includes/cmb2/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-company-info/includes/cmb2/includes/types/CMB2_Type_Colorpicker.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-company-info/includes/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/wp-company-info/includes/cmb2/includes/types/CMB2_Type_Text_Time.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/wp-company-info/includes/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/wp-company-info/includes/cmb2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/wp-company-info/includes/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-company-info/classes/class-wp-company-info-social-network-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-company-info/includes/cmb2/includes/helper-functions.php:127
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/wp-company-info/includes/cmb2/includes/types/CMB2_Type_Multicheck.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-company-info === )
Please take inspiration from this readme.txt

wp-company-info/wp-company-info.php 92% from 13 tests

The main PHP script in "WP Company Info" version 1.9.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin45,468 lines of code in 216 files:
LanguageFilesBlank linesComment linesLines of code
PO File12013,78217,88231,544
PHP601,9694,9006,350
CSS131,1131,1404,862
Sass13241251,184
JavaScript4240248890
Markdown62770638

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity16.47
▷ Minimum class complexity1.00
▷ Maximum class complexity168.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes66
▷ Abstract classes69.09%
▷ Concrete classes6090.91%
▷ Final classes00.00%
Methods427
▷ Static methods6214.52%
▷ Public methods36685.71%
▷ Protected methods5813.58%
▷ Private methods30.70%
Functions48
▷ Named functions4797.92%
▷ Anonymous functions12.08%
Constants9
▷ Global constants555.56%
▷ Class constants444.44%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
includes/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
includes/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
includes/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
includes/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%