83% centralhubb-wp-adserver-client

Code Review | Central Hubb AdServer Client

WordPress plugin Central Hubb AdServer Client scored83%from 54 tests.

About plugin

  • Plugin page: centralhubb-wp-ad...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.5
  • WordPress version: 6.3.1
  • First release: May 17, 2018
  • Latest release: May 17, 2018
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: iflickle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /679 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
Install script ran successfully

Server metrics [RAM: ▼0.56MB] [CPU: ▼19.35ms] Passed 4 tests

A check of server-side resources used by Central Hubb AdServer Client
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.13 ▼2.51
Dashboard /wp-admin3.44 ▲0.1057.35 ▼10.34
Posts /wp-admin/edit.php3.56 ▲0.2051.34 ▲2.03
Add New Post /wp-admin/post-new.php3.32 ▼2.5640.26 ▼66.58
Media Library /wp-admin/upload.php3.37 ▲0.1443.13 ▲2.93
Placeholders /wp-admin/admin.php?page=central-hubb-ad-server-placeholders3.3437.42
Reports: Clicks /wp-admin/admin.php?page=central-hubb-ad-server-analytics-reports-clicks3.3436.24
Charts: Impressions /wp-admin/admin.php?page=central-hubb-ad-server-analytics-charts-impressions3.3434.75
Placements /wp-admin/admin.php?page=central-hubb-ad-server-placements3.3440.86
Reports: Impressions /wp-admin/admin.php?page=central-hubb-ad-server-analytics-reports-impressions3.3433.66
Placement Previews /wp-admin/admin.php?page=central-hubb-ad-server-placement-previews3.3437.69
Account Settings /wp-admin/admin.php?page=central-hubb-ad-server-my-account3.3435.45
Images /wp-admin/admin.php?page=central-hubb-ad-server-images3.3437.90
CentralHubb Settings /wp-admin/options-general.php?page=central-hubb-settings3.3334.40
Publishers /wp-admin/admin.php?page=central-hubb-ad-server-publishers3.3438.10

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Central Hubb AdServer Client
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,002 ▲25613.39 ▼0.978.87 ▲7.0941.91 ▼3.83
Dashboard /wp-admin2,274 ▲975.63 ▼0.0288.45 ▼3.7240.78 ▼1.45
Posts /wp-admin/edit.php2,179 ▲792.00 ▼0.0439.89 ▲2.7534.78 ▲0.01
Add New Post /wp-admin/post-new.php1,587 ▲5923.18 ▲0.28688.69 ▼8.1453.17 ▼4.56
Media Library /wp-admin/upload.php1,479 ▲794.29 ▲0.0498.42 ▼15.1342.96 ▼5.01
Placeholders /wp-admin/admin.php?page=central-hubb-ad-server-placeholders8712.1923.7422.26
Reports: Clicks /wp-admin/admin.php?page=central-hubb-ad-server-analytics-reports-clicks8682.2224.2122.69
Charts: Impressions /wp-admin/admin.php?page=central-hubb-ad-server-analytics-charts-impressions8682.1923.6623.53
Placements /wp-admin/admin.php?page=central-hubb-ad-server-placements8531.8432.1131.62
Reports: Impressions /wp-admin/admin.php?page=central-hubb-ad-server-analytics-reports-impressions8712.1923.8322.55
Placement Previews /wp-admin/admin.php?page=central-hubb-ad-server-placement-previews8682.1924.0623.30
Account Settings /wp-admin/admin.php?page=central-hubb-ad-server-my-account8531.8424.9123.15
Images /wp-admin/admin.php?page=central-hubb-ad-server-images8682.1923.9623.48
CentralHubb Settings /wp-admin/options-general.php?page=central-hubb-settings8782.0125.4225.95
Publishers /wp-admin/admin.php?page=central-hubb-ad-server-publishers8682.1926.6221.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'CentralHubb\\CentralHubbAttributes' not found in wp-content/plugins/centralhubb-wp-adserver-client/classes/base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CentralHubb\\CentralhubbBase' not found in wp-content/plugins/centralhubb-wp-adserver-client/classes/plugin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/centralhubb-wp-adserver-client/config/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CentralHubb\\CentralhubbBase' not found in wp-content/plugins/centralhubb-wp-adserver-client/classes/settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/centralhubb-wp-adserver-client/config/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/centralhubb-wp-adserver-client/server/modules/default/views/index/index.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CentralHubb\\Mvc\\Controllers\\BaseController' not found in wp-content/plugins/centralhubb-wp-adserver-client/server/modules/default/controllers/IndexController.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CentralHubb\\CentralhubbBase' not found in wp-content/plugins/centralhubb-wp-adserver-client/classes/mvc.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CentralHubb\\CentralhubbBase' not found in wp-content/plugins/centralhubb-wp-adserver-client/classes/api.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
7 plugin tags: central hubb, wordpresscom, short tags, images, videos...

centralhubb-wp-adserver-client/index.php 85% from 13 tests

The main PHP file in "Central Hubb AdServer Client" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 291 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("centralhubb-wp-adserver-client.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected588 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12132245457
JavaScript16466129
Markdown1002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods42
▷ Static methods00.00%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 5.37MB with 4.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png579.51KB148.63KB▼ 74.35%
assets/screenshot-4.png1,164.62KB345.05KB▼ 70.37%
assets/screenshot-6.png1,455.93KB364.46KB▼ 74.97%
assets/screenshot-5.png1,001.73KB252.13KB▼ 74.83%
assets/screenshot-3.png521.35KB113.06KB▼ 78.31%