63% company-history

Code Review | Company History

WordPress plugin Company History scored63%from 54 tests.

About plugin

  • Plugin page: company-history
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-1.0
  • WordPress version: 6.3.1
  • First release: May 19, 2017
  • Latest release: May 19, 2017
  • Number of updates: 10
  • Update frequency: every 0.5 days
  • Top authors: wlekgkxo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /806 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.97MB] [CPU: ▼60.46ms] Passed 4 tests

Server-side resources used by Company History
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.27 ▼38.37
Dashboard /wp-admin2.05 ▼1.305.13 ▼60.23
Posts /wp-admin/edit.php2.05 ▼1.315.22 ▼49.83
Add New Post /wp-admin/post-new.php2.05 ▼3.846.39 ▼93.41
Media Library /wp-admin/upload.php2.05 ▼1.185.06 ▼30.46

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: 1 new table, 7 new options
New tables
wp_company_history
New WordPress options
can_compress_scripts
widget_recent-posts
widget_ch_plugin_widget_show
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Company History
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲5713.29 ▼1.081.61 ▼0.7442.69 ▲1.34
Dashboard /wp-admin2,226 ▲415.86 ▲0.9599.24 ▼20.0940.70 ▼1.73
Posts /wp-admin/edit.php2,112 ▲202.05 ▲0.0142.43 ▲1.9534.59 ▲0.97
Add New Post /wp-admin/post-new.php1,531 ▼223.37 ▲0.03647.57 ▼33.3880.42 ▲12.92
Media Library /wp-admin/upload.php1,408 ▲234.20 ▼0.0197.34 ▼4.1144.37 ▲1.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the chadminoptionstyle handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie tables detected upon uninstall: 1 table
    • wp_company_history
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_ch_plugin_widget_show
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/company-history/companyhistory.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 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #1, #2 in company-history/assets to your readme.txt
  • Plugin Name: You should set the name of your plugin on the first line ( === company-history === )
The official readme.txt might help

company-history/companyhistory.php 92% from 13 tests

The main PHP script in "Company History" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("company-history.php" instead of "companyhistory.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
Good job! No executable or dangerous file extensions detected948 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS2160468
PHP14210443
Markdown119037

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin