10% foma-news

Code Review | Foma's news

WordPress plugin Foma's news scored 10% from 54 tests.

About plugin

  • Plugin page: foma-news
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4
  • WordPress version: 6.3.1
  • First release: Sep 5, 2014
  • Latest release: Nov 26, 2015
  • Number of updates: 16
  • Update frequency: every 27.9 days
  • Top authors: ortox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,262 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/foma-news/foma-news.php+430
    Function create_function() is deprecated

Server metrics [RAM: ▼1.72MB] [CPU: ▼55.64ms] Passed 4 tests

This is a short check of server-side resources used by Foma's news
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.205.07 ▼37.42
Dashboard /wp-admin2.28 ▼1.026.56 ▼44.60
Posts /wp-admin/edit.php2.28 ▼1.077.07 ▼43.48
Add New Post /wp-admin/post-new.php2.28 ▼3.606.83 ▼97.07
Media Library /wp-admin/upload.php2.28 ▼0.956.79 ▼30.49

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_fomanews
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Foma's news
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.571.60 ▼0.5543.39 ▼1.31
Dashboard /wp-admin2,206 ▲154.85 ▼1.06106.49 ▲6.6343.55 ▼0.81
Posts /wp-admin/edit.php2,089 ▼32.00 ▲0.0042.20 ▲2.1737.21 ▲1.47
Add New Post /wp-admin/post-new.php1,514 ▼2917.69 ▼0.51599.26 ▼32.9255.88 ▲2.17
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.1896.12 ▼4.0341.25 ▼2.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/foma-news/foma-news.php+430
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_fomanews
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/foma-news/foma-news.php:68

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
6 plugin tags: fomaru, journal, foma, widget, orthodox...

foma-news/foma-news.php Passed 13 tests

Analyzing the main PHP file in "Foma's news" version 1.0.1
83 characters long description:
Новости и анонсы православного журнала "Фома"

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
There were no executable files found in this plugin394 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16551314
PO File2263680

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity12.25
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.48MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png178.50KB56.92KB▼ 68.11%
screenshot-3.png60.67KB21.94KB▼ 63.84%
screenshot-2.png104.59KB37.36KB▼ 64.28%
screenshot-1.png51.29KB16.81KB▼ 67.23%
logo.png16.16KB7.21KB▼ 55.39%