84% the-loops

Code Review | The Loops

WordPress plugin The Loops scored84%from 54 tests.

About plugin

  • Plugin page: the-loops
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.2
  • WordPress version: 6.3.1
  • First release: Dec 30, 2011
  • Latest release: Jun 27, 2019
  • Number of updates: 24
  • Update frequency: every 115.4 days
  • Top authors: sorich87 (87.5%)justinahinon (16.67%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,394 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
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼3.80ms] Passed 4 tests

A check of server-side resources used by The Loops
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1243.84 ▼1.00
Dashboard /wp-admin3.48 ▲0.1349.28 ▼15.55
Posts /wp-admin/edit.php3.60 ▲0.2354.37 ▲2.36
Add New Post /wp-admin/post-new.php6.22 ▲0.3399.69 ▼1.00
Media Library /wp-admin/upload.php3.40 ▲0.1740.57 ▲4.31
Loops /wp-admin/edit.php?post_type=tl_loop3.4538.61

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_tl_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

The Loops: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.42 ▲0.131.71 ▲0.2543.13 ▲2.55
Dashboard /wp-admin2,202 ▲255.62 ▼0.0395.93 ▼0.3739.75 ▼3.07
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0440.06 ▼4.0437.08 ▼2.08
Add New Post /wp-admin/post-new.php1,532 ▲623.17 ▼0.56701.35 ▲23.0354.63 ▼8.32
Media Library /wp-admin/upload.php1,407 ▲74.21 ▲0.09109.55 ▼1.7746.98 ▼0.61
Loops /wp-admin/edit.php?post_type=tl_loop1,0681.9733.3130.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_tl_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-loops/tl-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tl_have_users() in wp-content/plugins/the-loops/tl-templates/the-loops-users-bio.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/the-loops/tl-templates/the-loops-posts-full.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/the-loops/tl-templates/the-loops-posts-excerpt.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/the-loops/tl-templates/the-loops-posts-title.php:17

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: posts, custom post types, pages, tloops, users...

the-loops/the-loops.php Passed 13 tests

Analyzing the main PHP file in "The Loops" version 1.0.2
123 characters long description:
The Loops allows you to query the WordPress database for content and display it in a page without having to write php code.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin2,534 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP103435141,596
CSS657131550
JavaScript68527388

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity17.50
▷ Minimum class complexity2.00
▷ Maximum class complexity36.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods2674.29%
▷ Public methods3291.43%
▷ Protected methods00.00%
▷ Private methods38.57%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.02MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_21759b_256x240.png5.23KB4.11KB▼ 21.49%
css/images/ui-icons_333333_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-icons_cc0000_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-icons_999999_256x240.png4.27KB4.11KB▼ 3.78%