83% beagency-lite

Code Review | BeAgency Lite Plugin

WordPress plugin BeAgency Lite Plugin scored83%from 54 tests.

About plugin

  • Plugin page: beagency-lite
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.4
  • WordPress version: 6.3.1
  • First release: Jun 9, 2017
  • Latest release: Jun 9, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: bethememe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,430 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.64ms] Passed 4 tests

An overview of server-side resources used by BeAgency Lite Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.60 ▼4.41
Dashboard /wp-admin3.40 ▲0.0944.03 ▼6.02
Posts /wp-admin/edit.php3.51 ▲0.1546.33 ▼0.52
Add New Post /wp-admin/post-new.php5.99 ▲0.1188.60 ▲3.32
Media Library /wp-admin/upload.php3.32 ▲0.0933.84 ▲0.39
Portfolios /wp-admin/edit.php?post_type=portfolio3.3637.10
Add New /wp-admin/post-new.php?post_type=portfolio3.9865.42
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tag&post_type=portfolio3.3132.00

Server storage [IO: ▲2.32MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 306 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by BeAgency Lite Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11013.21 ▼0.994.37 ▲2.5838.17 ▼5.07
Dashboard /wp-admin2,245 ▲534.92 ▼0.99102.32 ▼18.6538.66 ▼6.92
Posts /wp-admin/edit.php2,134 ▲452.08 ▲0.0340.86 ▲7.3634.35 ▼0.26
Add New Post /wp-admin/post-new.php1,552 ▲1923.23 ▼0.31625.52 ▼56.5451.94 ▼2.37
Media Library /wp-admin/upload.php1,430 ▲394.26 ▲0.1393.56 ▼10.9540.62 ▼4.76
Portfolios /wp-admin/edit.php?post_type=portfolio1,1031.9932.8129.92
Add New /wp-admin/post-new.php?post_type=portfolio2,4257.85168.5464.31
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tag&post_type=portfolio1,3072.3128.3925.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/beagency-lite/inc/cmb2/bootstrap.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beagency-lite/inc/cmb2/init.php:119
    • > PHP Fatal error
      Uncaught Error: Class 'CPT' not found in wp-content/plugins/beagency-lite/inc/cpt/portfolio-post-type.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beagency-lite/beagency-lite-plugin.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beagency-lite/inc/custom-menu/menu-item-custom-field.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu_Edit' not found in wp-content/plugins/beagency-lite/inc/custom-menu/walker-nav-menu-edit.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beagency-lite/inc/cmb2/init.php:119

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === beagency-lite === )
The official readme.txt is a good inspiration

beagency-lite/beagency-lite-plugin.php 85% from 13 tests

The entry point to "BeAgency Lite Plugin" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("beagency-lite.php" instead of "beagency-lite-plugin.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin38,461 lines of code in 160 files:
LanguageFilesBlank linesComment linesLines of code
PO File11912,73116,32929,151
CSS41,0081,0223,888
PHP211,1562,6213,315
Sass11168231,116
JavaScript3164116654
Markdown21190337

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity33.32
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods234
▷ Static methods2811.97%
▷ Public methods22294.87%
▷ Protected methods93.85%
▷ Private methods31.28%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.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
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
inc/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
inc/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
inc/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
inc/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%