78% pronamic-companies

Code Review | Pronamic Companies

WordPress plugin Pronamic Companies scored78%from 54 tests.

About plugin

  • Plugin page: pronamic-companies
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Jul 19, 2012
  • Latest release: May 11, 2022
  • Number of updates: 18
  • Update frequency: every 199.1 days
  • Top authors: remcotolsma (77.78%)pronamic (27.78%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,396 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼3.28ms] Passed 4 tests

A check of server-side resources used by Pronamic Companies
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2541.99 ▼2.32
Dashboard /wp-admin3.65 ▲0.3449.30 ▼6.78
Posts /wp-admin/edit.php3.70 ▲0.3451.53 ▲1.65
Add New Post /wp-admin/post-new.php6.17 ▲0.2889.62 ▼4.89
Media Library /wp-admin/upload.php3.51 ▲0.2839.45 ▲0.89
Add New /wp-admin/post-new.php?post_type=pronamic_company3.7057.52
Settings /wp-admin/edit.php?post_type=pronamic_company&page=pronamic_companies_settings3.5246.13
Export /wp-admin/edit.php?post_type=pronamic_company&page=pronamic_companies_export3.5238.30
Companies /wp-admin/edit.php?post_type=pronamic_company3.5238.36

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
pronamic_companies_version
can_compress_scripts
widget_theysaidso_widget
pronamic_companies_taxonomies

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pronamic Companies
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.25 ▼0.291.63 ▼0.2745.23 ▲0.29
Dashboard /wp-admin2,230 ▲535.59 ▲0.0589.46 ▼4.7339.90 ▼1.36
Posts /wp-admin/edit.php2,135 ▲351.99 ▼0.0134.47 ▼1.0233.31 ▼8.38
Add New Post /wp-admin/post-new.php1,563 ▲2818.42 ▲0.35632.13 ▼35.1670.63 ▼0.59
Media Library /wp-admin/upload.php1,438 ▲414.20 ▲0.0498.60 ▼5.3543.43 ▼0.57
Add New /wp-admin/post-new.php?post_type=pronamic_company2,7407.62182.7876.34
Settings /wp-admin/edit.php?post_type=pronamic_company&page=pronamic_companies_settings1,1353.5172.7637.18
Export /wp-admin/edit.php?post_type=pronamic_company&page=pronamic_companies_export9913.5370.6131.55
Companies /wp-admin/edit.php?post_type=pronamic_company1,1261.9430.4531.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • pronamic_companies_version
    • can_compress_scripts
    • pronamic_companies_taxonomies
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=pronamic_company
    • > Notice in wp-content/plugins/pronamic-companies/includes/class-admin.php+207
    Undefined index: pronamic_company_category

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
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pronamic-companies/pronamic-companies.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pronamic-companies/admin/export.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pronamic-companies/admin/pronamic.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pronamic-companies/admin/plugins.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/pronamic-companies/admin/meta-box.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pronamic-companies/includes/gravityforms.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/pronamic-companies/examples/templates/single-pronamic_company.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function flush_rewrite_rules() in wp-content/plugins/pronamic-companies/admin/settings.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Companies overview page), #2 (Edit company page), #3 (Company categories overview page), #4 (Companies settings page), #5 (Companies export page), #6 (Companies export Firefox save dialog), #7 (Companies export OpenOffice open dialog)
You can look at the official readme.txt

pronamic-companies/pronamic-companies.php 92% from 13 tests

The main PHP script in "Pronamic Companies" version 1.1.2 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Everything looks great! No dangerous files found in this plugin2,096 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP154234411,583
PO File1495925396
SQL22316108
CSS1209

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.22
Average class complexity18.67
▷ Minimum class complexity14.00
▷ Maximum class complexity22.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions53
▷ Named functions53100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.48MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png147.49KB71.32KB▼ 51.64%
screenshot-5.png56.97KB26.55KB▼ 53.40%
screenshot-1.png64.60KB28.91KB▼ 55.25%
screenshot-7.png55.84KB23.45KB▼ 58.01%
screenshot-4.png78.67KB36.76KB▼ 53.27%