84% cff-area-and-perimeter-operations

Code Review | CFF Area and Perimeter Operations

WordPress plugin CFF Area and Perimeter Operations scored84%from 54 tests.

About plugin

  • Plugin page: cff-area-and-peri...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jan 16, 2023
  • Latest release: Jul 22, 2023
  • Number of updates: 5
  • Update frequency: every 37.4 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /249 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.49ms] Passed 4 tests

An overview of server-side resources used by CFF Area and Perimeter Operations
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.40 ▼0.36
Dashboard /wp-admin3.32 ▲0.0248.70 ▼3.16
Posts /wp-admin/edit.php3.37 ▲0.0149.46 ▲0.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.79 ▼19.34
Media Library /wp-admin/upload.php3.24 ▲0.0139.63 ▲4.45

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for CFF Area and Perimeter Operations
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.28 ▼1.091.74 ▲0.1040.24 ▼6.62
Dashboard /wp-admin2,239 ▲485.86 ▲0.0398.38 ▼5.7082.16 ▲37.25
Posts /wp-admin/edit.php2,092 ▼02.03 ▲0.0340.74 ▲1.5544.70 ▲11.71
Add New Post /wp-admin/post-new.php1,533 ▲1922.78 ▲5.24613.86 ▼51.4160.77 ▲0.40
Media Library /wp-admin/upload.php1,391 ▲124.21 ▼0.04101.95 ▼0.0144.81 ▼0.93

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 1× 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/cff-area-and-perimeter-operations/cff-area-perimeter-operations.php:49

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: operation, perimeter, equation, figure, music cff...

cff-area-and-perimeter-operations/cff-area-perimeter-operations.php 85% from 13 tests

The main PHP script in "CFF Area and Perimeter Operations" version 1.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cff-area-and-perimeter-operations.php" instead of "cff-area-perimeter-operations.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
Everything looks great! No dangerous files found in this plugin558 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2504453
PHP1122279
PO File12226

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods550.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin