83% companies-house-integrator

Code Review | Name: COMPANIES HOUSE INTEGRATOR

WordPress plugin Name: COMPANIES HOUSE INTEGRATORscored83%from 54 tests.

About plugin

  • Plugin page: companies-house-i...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.6
  • WordPress version: 6.3.1
  • First release: Apr 17, 2018
  • Latest release: Apr 17, 2018
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: glg21 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /809 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.06MB] [CPU: ▼3.02ms] Passed 4 tests

Analyzing server-side resources used by Name: COMPANIES HOUSE INTEGRATOR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.77 ▼0.04
Dashboard /wp-admin3.37 ▲0.0644.72 ▼7.31
Posts /wp-admin/edit.php3.42 ▲0.0648.16 ▲4.52
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.44 ▼6.35
Media Library /wp-admin/upload.php3.29 ▲0.0634.66 ▲1.62

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Name: COMPANIES HOUSE INTEGRATOR
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.77 ▲0.341.60 ▼0.1244.19 ▼1.88
Dashboard /wp-admin2,223 ▲354.92 ▼0.9495.10 ▼17.3379.52 ▲34.19
Posts /wp-admin/edit.php2,103 ▲142.05 ▲0.0640.05 ▲3.5336.44 ▲2.43
Add New Post /wp-admin/post-new.php1,537 ▲418.02 ▼4.92646.67 ▼3.4361.54 ▲12.16
Media Library /wp-admin/upload.php1,412 ▲244.30 ▲0.05100.96 ▼3.7271.07 ▲26.96

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/companies-house-integrator/index.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/companies-house-integrator/addComUser.php:264

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 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
Attributes that require attention:
  • Donate link: Invalid URI ("k-b-c@outlook.com")
  • Plugin Name: You should set the name of your plugin on the first line ( === Name: COMPANIES HOUSE INTEGRATOR=== )
You can take inspiration from this readme.txt

companies-house-integrator/index.php 92% from 13 tests

Analyzing the main PHP file in "Name: COMPANIES HOUSE INTEGRATOR" version 1.2
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("companies-house-integrator.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin558 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP512779558

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon.png3.64KB1.47KB▼ 59.60%
screenshot-1.png29.43KB14.63KB▼ 50.29%